mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07:00
[RSS] Don't hide the elements in Unread list when clicked
This commit is contained in:
parent
7c6da30705
commit
7c7da44622
1 changed files with 6 additions and 18 deletions
|
@ -547,17 +547,8 @@ void RSSImp::refreshTextBrowser()
|
||||||
QListWidgetItem *item = selection.first();
|
QListWidgetItem *item = selection.first();
|
||||||
Q_ASSERT(item);
|
Q_ASSERT(item);
|
||||||
if (item == m_currentArticle) return;
|
if (item == m_currentArticle) return;
|
||||||
// Stop displaying previous news if necessary
|
m_currentArticle = item;
|
||||||
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());
|
RssFeedPtr stream = m_feedList->getRSSItemFromUrl(item->data(Article::FeedUrlRole).toString());
|
||||||
RssArticlePtr article = stream->getItem(item->data(Article::IdRole).toString());
|
RssArticlePtr article = stream->getItem(item->data(Article::IdRole).toString());
|
||||||
QString html;
|
QString html;
|
||||||
|
@ -680,14 +671,11 @@ void RSSImp::onFeedContentChanged(const QString& url)
|
||||||
qDebug() << Q_FUNC_INFO << url;
|
qDebug() << Q_FUNC_INFO << url;
|
||||||
QTreeWidgetItem *item = m_feedList->getTreeItemFromUrl(url);
|
QTreeWidgetItem *item = m_feedList->getTreeItemFromUrl(url);
|
||||||
// If the feed is selected, update the displayed news
|
// If the feed is selected, update the displayed news
|
||||||
if (m_feedList->currentItem() == item ) {
|
if (m_feedList->currentItem() == item)
|
||||||
populateArticleList(item);
|
populateArticleList(item);
|
||||||
}
|
// Update unread items
|
||||||
else {
|
else if (m_feedList->currentItem() == m_feedList->stickyUnreadItem())
|
||||||
// Update unread items
|
populateArticleList(m_feedList->stickyUnreadItem());
|
||||||
if (m_feedList->currentItem() == m_feedList->stickyUnreadItem())
|
|
||||||
populateArticleList(m_feedList->stickyUnreadItem());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RSSImp::updateRefreshInterval(uint val)
|
void RSSImp::updateRefreshInterval(uint val)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue