mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
RSS: Cache number of unread articles in a feed instead of computing it every time.
Optimization to address issue #34.
This commit is contained in:
parent
58bc10fc47
commit
aecdc57cd4
8 changed files with 72 additions and 23 deletions
|
@ -33,6 +33,7 @@
|
|||
#include <iostream>
|
||||
|
||||
#include "rssarticle.h"
|
||||
#include "rssfeed.h"
|
||||
|
||||
// public constructor
|
||||
RssArticle::RssArticle(RssFeed* parent, const QString &guid):
|
||||
|
@ -102,7 +103,11 @@ bool RssArticle::isRead() const {
|
|||
}
|
||||
|
||||
void RssArticle::markAsRead() {
|
||||
if (m_read)
|
||||
return;
|
||||
|
||||
m_read = true;
|
||||
m_parent->decrementUnreadCount();
|
||||
}
|
||||
|
||||
const QString& RssArticle::guid() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue