[RSS] Don't hide the elements in Unread list when clicked

This commit is contained in:
ngosang 2015-08-04 17:21:04 +02:00
parent 7c6da30705
commit 7c7da44622

View file

@ -547,17 +547,8 @@ void RSSImp::refreshTextBrowser()
QListWidgetItem *item = selection.first();
Q_ASSERT(item);
if (item == m_currentArticle) return;
// Stop displaying previous news if necessary
if (m_feedList->currentFeed() == m_feedList->stickyUnreadItem()) {
if (m_currentArticle) {
disconnect(listArticles, SIGNAL(itemSelectionChanged()), this, SLOT(refreshTextBrowser()));
listArticles->removeItemWidget(m_currentArticle);
Q_ASSERT(m_currentArticle);
delete m_currentArticle;
connect(listArticles, SIGNAL(itemSelectionChanged()), this, SLOT(refreshTextBrowser()));
}
m_currentArticle = item;
}
RssFeedPtr stream = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString());
RssArticlePtr article = stream->getItem(item->data(Article::IdRole).toString());
QString html;
@ -680,14 +671,11 @@ void RSSImp::onFeedContentChanged(const QString& url)
qDebug() << Q_FUNC_INFO << url;
QTreeWidgetItem *item = m_feedList->getTreeItemFromUrl(url);
// If the feed is selected, update the displayed news
if (m_feedList->currentItem() == item ) {
if (m_feedList->currentItem() == item)
populateArticleList(item);
}
else {
// Update unread items
if (m_feedList->currentItem() == m_feedList->stickyUnreadItem())
else if (m_feedList->currentItem() == m_feedList->stickyUnreadItem())
populateArticleList(m_feedList->stickyUnreadItem());
}
}
void RSSImp::updateRefreshInterval(uint val)