mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-30 16:34:16 +00:00
Don't remove read articles from Unread list
Revert back old behavior (incorrect but, perhaps, more user-friendly), when Unread list populates with "unread" articles only but then it can contain "read" articles if they become "read" when Unread list is shown.
This commit is contained in:
parent
2d3914c077
commit
76e3383650
@ -38,7 +38,7 @@ ArticleListWidget::ArticleListWidget(QWidget *parent)
|
|||||||
{
|
{
|
||||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
setSelectionMode(QAbstractItemView::ExtendedSelection);
|
setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
|
|
||||||
checkInvariant();
|
checkInvariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,14 +93,9 @@ void ArticleListWidget::handleArticleAdded(RSS::Article *rssArticle)
|
|||||||
|
|
||||||
void ArticleListWidget::handleArticleRead(RSS::Article *rssArticle)
|
void ArticleListWidget::handleArticleRead(RSS::Article *rssArticle)
|
||||||
{
|
{
|
||||||
if (m_unreadOnly) {
|
auto item = mapRSSArticle(rssArticle);
|
||||||
delete m_rssArticleToListItemMapping.take(rssArticle);
|
item->setData(Qt::ForegroundRole, QColor("grey"));
|
||||||
}
|
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));
|
||||||
else {
|
|
||||||
auto item = mapRSSArticle(rssArticle);
|
|
||||||
item->setData(Qt::ForegroundRole, QColor("grey"));
|
|
||||||
item->setData(Qt::DecorationRole, QIcon(":/icons/sphere.png"));
|
|
||||||
}
|
|
||||||
|
|
||||||
checkInvariant();
|
checkInvariant();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user