Keep RSS articles sorted by date in memory do avoid sorting them all the time

Optimization to address issue #34.
This commit is contained in:
Christophe Dumez 2012-08-19 11:46:50 +03:00
parent aecdc57cd4
commit d1e30cacf8
8 changed files with 58 additions and 61 deletions

View file

@ -490,11 +490,9 @@ void RSSImp::refreshArticleList(QTreeWidgetItem* item) {
qDebug("Getting the list of news");
RssArticleList news;
if (rss_item == m_rssManager)
news = rss_item->unreadArticleList();
news = rss_item->unreadArticleListByDateDesc();
else if (rss_item)
news = rss_item->articleList();
// Sort
RssManager::sortArticleListByDateDesc(news);
news = rss_item->articleListByDateDesc();
// Clear the list first
textBrowser->clear();
m_currentArticle = 0;