mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-14 16:57:55 +00:00
- Mark news feed articles as read even if they are visited with keyboard arrows
This commit is contained in:
parent
e3a29d8ebf
commit
be240f72ab
@ -591,7 +591,6 @@ short RssStream::readDoc(const QDomDocument& doc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
|
@ -460,8 +460,11 @@ void RSSImp::refreshNewsList(QTreeWidgetItem* item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// display a news
|
// display a news
|
||||||
void RSSImp::refreshTextBrowser(QTreeWidgetItem *item) {
|
void RSSImp::refreshTextBrowser() {
|
||||||
if(!item || item == previous_news) return;
|
QList<QTreeWidgetItem*> selection = listNews->selectedItems();
|
||||||
|
if(selection.empty()) return;
|
||||||
|
QTreeWidgetItem *item = selection.first();
|
||||||
|
if(item == previous_news) return;
|
||||||
// Stop displaying previous news if necessary
|
// Stop displaying previous news if necessary
|
||||||
if(listStreams->currentFeed() == listStreams->getUnreadItem()) {
|
if(listStreams->currentFeed() == listStreams->getUnreadItem()) {
|
||||||
if(previous_news) {
|
if(previous_news) {
|
||||||
@ -596,7 +599,7 @@ RSSImp::RSSImp(bittorrent *BTSession) : QWidget(), BTSession(BTSession){
|
|||||||
connect(listStreams, SIGNAL(foldersAltered(QList<QTreeWidgetItem*>)), this, SLOT(updateItemsInfos(QList<QTreeWidgetItem*>)));
|
connect(listStreams, SIGNAL(foldersAltered(QList<QTreeWidgetItem*>)), this, SLOT(updateItemsInfos(QList<QTreeWidgetItem*>)));
|
||||||
connect(listStreams, SIGNAL(overwriteAttempt(QString)), this, SLOT(displayOverwriteError(QString)));
|
connect(listStreams, SIGNAL(overwriteAttempt(QString)), this, SLOT(displayOverwriteError(QString)));
|
||||||
|
|
||||||
connect(listNews, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(refreshTextBrowser(QTreeWidgetItem *)));
|
connect(listNews, SIGNAL(itemSelectionChanged()), this, SLOT(refreshTextBrowser()));
|
||||||
connect(listNews, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(downloadTorrent()));
|
connect(listNews, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(downloadTorrent()));
|
||||||
|
|
||||||
// Refresh all feeds
|
// Refresh all feeds
|
||||||
|
@ -63,7 +63,7 @@ protected slots:
|
|||||||
void refreshSelectedItems();
|
void refreshSelectedItems();
|
||||||
void copySelectedFeedsURL();
|
void copySelectedFeedsURL();
|
||||||
void refreshNewsList(QTreeWidgetItem* item);
|
void refreshNewsList(QTreeWidgetItem* item);
|
||||||
void refreshTextBrowser(QTreeWidgetItem *);
|
void refreshTextBrowser();
|
||||||
void updateFeedIcon(QString url, QString icon_path);
|
void updateFeedIcon(QString url, QString icon_path);
|
||||||
void updateFeedInfos(QString url, QString aliasOrUrl, unsigned int nbUnread);
|
void updateFeedInfos(QString url, QString aliasOrUrl, unsigned int nbUnread);
|
||||||
void updateItemsInfos(QList<QTreeWidgetItem*> items);
|
void updateItemsInfos(QList<QTreeWidgetItem*> items);
|
||||||
|
Loading…
Reference in New Issue
Block a user