| 375 | } |
| 376 | |
| 377 | void GridComicsView::setCurrentComicIfNeeded() |
| 378 | { |
| 379 | if (model == nullptr) { |
| 380 | return; |
| 381 | } |
| 382 | |
| 383 | bool found; |
| 384 | currentComic = currentComicFromModel(model, found); |
| 385 | |
| 386 | QQmlContext *ctxt = view->rootContext(); |
| 387 | |
| 388 | ComicModel::Mode mode = model->getMode(); |
| 389 | |
| 390 | bool showCurrentComic = found && |
| 391 | filterEnabled == false && |
| 392 | (mode == ComicModel::Mode::Folder || mode == ComicModel::Mode::ReadingList) && |
| 393 | settings->value(DISPLAY_CONTINUE_READING_IN_GRID_VIEW, true).toBool(); |
| 394 | |
| 395 | ctxt->setContextProperty("currentComic", ¤tComic); |
| 396 | ctxt->setContextProperty("currentComicInfo", &(currentComic.info)); |
| 397 | ctxt->setContextProperty("showCurrentComic", QVariant(showCurrentComic)); |
| 398 | } |
| 399 | |
| 400 | void GridComicsView::resetScroll() |
| 401 | { |
nothing calls this directly
no test coverage detected