From 6ba5df3ec88add1657daa347dce51bbb6358da84 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 24 Aug 2009 08:12:42 +0000 Subject: [PATCH] - Fix "Refresh selected stream" when Unread item is selected --- src/rss_imp.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/rss_imp.cpp b/src/rss_imp.cpp index fb1033ccb..c7793c813 100644 --- a/src/rss_imp.cpp +++ b/src/rss_imp.cpp @@ -317,13 +317,21 @@ void RSSImp::refreshSelectedItems() { foreach(QTreeWidgetItem* item, selectedItems){ RssFile* file = listStreams->getRSSItem(item); // Update icons - if(file->getType() == RssFile::STREAM) { - item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); - } else { - // Update feeds in the folder - foreach(QTreeWidgetItem *feed, listStreams->getAllFeedItems(item)) { + if(item == listStreams->getUnreadItem()) { + foreach(QTreeWidgetItem *feed, listStreams->getAllFeedItems()) { feed->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); } + file->refresh(); + break; + } else { + if(file->getType() == RssFile::STREAM) { + item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); + } else { + // Update feeds in the folder + foreach(QTreeWidgetItem *feed, listStreams->getAllFeedItems(item)) { + feed->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); + } + } } // Actually refresh file->refresh();