mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-02 18:36:49 +01:00
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() {
|
||||
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() {
|
||||
|
@ -73,14 +73,16 @@ QList<ServiceEntryPoint*> FeedReader::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;
|
||||
|
||||
if (!update_switched_off_too) {
|
||||
for (int i = 0; i < my_feeds.size(); i++) {
|
||||
if (my_feeds.at(i)->isSwitchedOff()) {
|
||||
my_feeds.removeAt(i--);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (my_feeds.isEmpty()) {
|
||||
return;
|
||||
|
@ -36,7 +36,7 @@ class RSSGUARD_DLLSPEC FeedReader : public QObject {
|
||||
MessagesProxyModel* messagesProxyModel() const;
|
||||
|
||||
// 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.
|
||||
void synchronizeMessageData(const QList<CacheForServiceRoot*>& caches);
|
||||
|
Loading…
x
Reference in New Issue
Block a user