Browse Source

- Fix "Refresh selected stream" when Unread item is selected

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
6ba5df3ec8
  1. 18
      src/rss_imp.cpp

18
src/rss_imp.cpp

@ -317,13 +317,21 @@ void RSSImp::refreshSelectedItems() {
foreach(QTreeWidgetItem* item, selectedItems){ foreach(QTreeWidgetItem* item, selectedItems){
RssFile* file = listStreams->getRSSItem(item); RssFile* file = listStreams->getRSSItem(item);
// Update icons // Update icons
if(file->getType() == RssFile::STREAM) { if(item == listStreams->getUnreadItem()) {
item->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); foreach(QTreeWidgetItem *feed, listStreams->getAllFeedItems()) {
} else {
// Update feeds in the folder
foreach(QTreeWidgetItem *feed, listStreams->getAllFeedItems(item)) {
feed->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png"))); 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 // Actually refresh
file->refresh(); file->refresh();

Loading…
Cancel
Save