if user has specific feed selected directly, it can be fetched even if it is disabled
This commit is contained in:
parent
88203ad383
commit
3f41aeba06
@ -230,7 +230,11 @@ void FeedsView::expandCollapseCurrentItem(bool recursive) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FeedsView::updateSelectedItems() {
|
void FeedsView::updateSelectedItems() {
|
||||||
qApp->feedReader()->updateFeeds(selectedFeeds(true));
|
auto sel_feeds = selectedFeeds(true);
|
||||||
|
auto sel_items = selectedItems();
|
||||||
|
bool one_specific_feed_selected = sel_items.size() == 1 && sel_items.constFirst()->kind() == RootItem::Kind::Feed;
|
||||||
|
|
||||||
|
qApp->feedReader()->updateFeeds(sel_feeds, one_specific_feed_selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedsView::clearSelectedItems() {
|
void FeedsView::clearSelectedItems() {
|
||||||
|
@ -73,14 +73,16 @@ QList<ServiceEntryPoint*> FeedReader::feedServices() {
|
|||||||
return m_feedServices;
|
return m_feedServices;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FeedReader::updateFeeds(const QList<Feed*>& feeds) {
|
void FeedReader::updateFeeds(const QList<Feed*>& feeds, bool update_switched_off_too) {
|
||||||
auto my_feeds = feeds;
|
auto my_feeds = feeds;
|
||||||
|
|
||||||
|
if (!update_switched_off_too) {
|
||||||
for (int i = 0; i < my_feeds.size(); i++) {
|
for (int i = 0; i < my_feeds.size(); i++) {
|
||||||
if (my_feeds.at(i)->isSwitchedOff()) {
|
if (my_feeds.at(i)->isSwitchedOff()) {
|
||||||
my_feeds.removeAt(i--);
|
my_feeds.removeAt(i--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (my_feeds.isEmpty()) {
|
if (my_feeds.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -36,7 +36,7 @@ class RSSGUARD_DLLSPEC FeedReader : public QObject {
|
|||||||
MessagesProxyModel* messagesProxyModel() const;
|
MessagesProxyModel* messagesProxyModel() const;
|
||||||
|
|
||||||
// Update feeds in extra thread.
|
// Update feeds in extra thread.
|
||||||
void updateFeeds(const QList<Feed*>& feeds);
|
void updateFeeds(const QList<Feed*>& feeds, bool update_switched_off_too = false);
|
||||||
|
|
||||||
// Push back cached message states back to servers in extra thread.
|
// Push back cached message states back to servers in extra thread.
|
||||||
void synchronizeMessageData(const QList<CacheForServiceRoot*>& caches);
|
void synchronizeMessageData(const QList<CacheForServiceRoot*>& caches);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user