Merge pull request #3284 from jolavillette/fix/feedreader-mark-all-unread

FeedReader: add "Mark all as unread" alongside "Mark all as read"
This commit is contained in:
csoler 2026-07-30 14:34:04 +02:00 committed by GitHub
commit 2bf991418d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View File

@ -364,6 +364,9 @@ void FeedReaderMessageWidget::msgTreeCustomPopupMenu(QPoint /*point*/)
action = contextMnu.addAction(QIcon(""), tr("Mark all as read"), this, SLOT(markAllAsReadMsg()));
action->setEnabled(mFeedId);
action = contextMnu.addAction(QIcon(""), tr("Mark all as unread"), this, SLOT(markAllAsUnreadMsg()));
action->setEnabled(mFeedId);
contextMnu.addSeparator();
action = contextMnu.addAction(QIcon(""), tr("Copy link"), this, SLOT(copySelectedLinksMsg()));
@ -820,6 +823,16 @@ void FeedReaderMessageWidget::markAsUnreadMsg()
}
void FeedReaderMessageWidget::markAllAsReadMsg()
{
setAllMsgAsReadUnread(true);
}
void FeedReaderMessageWidget::markAllAsUnreadMsg()
{
setAllMsgAsReadUnread(false);
}
void FeedReaderMessageWidget::setAllMsgAsReadUnread(bool read)
{
QList<QTreeWidgetItem*> items;
@ -831,7 +844,7 @@ void FeedReaderMessageWidget::markAllAsReadMsg()
}
++it;
}
setMsgAsReadUnread(items, true);
setMsgAsReadUnread(items, read);
}
void FeedReaderMessageWidget::copySelectedLinksMsg()

View File

@ -68,6 +68,7 @@ private slots:
void markAsReadMsg();
void markAsUnreadMsg();
void markAllAsReadMsg();
void markAllAsUnreadMsg();
void copySelectedLinksMsg();
void removeMsg();
void processFeed();
@ -91,6 +92,7 @@ private:
void calculateMsgIconsAndFonts(QTreeWidgetItem *item);
void updateMsgItem(QTreeWidgetItem *item, FeedMsgInfo &info);
void setMsgAsReadUnread(QList<QTreeWidgetItem*> &rows, bool read);
void setAllMsgAsReadUnread(bool read);
void filterItem(QTreeWidgetItem *item, const QString &text, int filterColumn);
void filterItem(QTreeWidgetItem *item);
void toggleMsgText_internal();