| 1601 | } |
| 1602 | |
| 1603 | void LibraryWindow::showContinueReadingContextMenu(QPoint point, ComicDB comic) |
| 1604 | { |
| 1605 | QMenu menu; |
| 1606 | |
| 1607 | auto setAsUnReadAction = new QAction(); |
| 1608 | setAsUnReadAction->setText(tr("Set as unread")); |
| 1609 | setAsUnReadAction->setIcon(theme.comicsViewToolbar.setAsUnreadIcon); |
| 1610 | |
| 1611 | menu.addAction(setAsUnReadAction); |
| 1612 | |
| 1613 | connect(setAsUnReadAction, &QAction::triggered, this, [=]() { |
| 1614 | auto libraryId = libraries.getId(selectedLibrary->currentText()); |
| 1615 | auto info = comic.info; |
| 1616 | info.setRead(false); |
| 1617 | info.currentPage = 1; |
| 1618 | info.hasBeenOpened = false; |
| 1619 | info.lastTimeOpened = QVariant(); |
| 1620 | DBHelper::update(libraryId, info); |
| 1621 | |
| 1622 | contentViewsManager->folderContentView->reloadContinueReadingModel(); |
| 1623 | }); |
| 1624 | |
| 1625 | menu.exec(contentViewsManager->folderContentView->mapToGlobal(point)); |
| 1626 | } |
| 1627 | |
| 1628 | void LibraryWindow::setupAddToSubmenu(QMenu &menu) |
| 1629 | { |
nothing calls this directly
no test coverage detected