From fa3ea1fcc896955480857340dce119bdaba7771a Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sun, 3 Jan 2016 09:54:42 +0100 Subject: [PATCH] Fixed #141, fixed #139. --- resources/text/CHANGELOG | 2 ++ src/gui/messagesview.cpp | 1 + src/services/standard/standardfeed.cpp | 4 ++++ src/services/standard/standardserviceroot.cpp | 3 ++- src/services/tt-rss/ttrssfeed.cpp | 4 ++++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index 4a6257987..c46df3e8c 100755 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -5,6 +5,8 @@ Fixed: ▪ Fixed problem with importing invalid OPML 2.0 files. (bug #145) ▪ Fixed error in SQL initialization script which led to problems with in-memory SQLite DBs. (bug #140) +▪ Fixed problem with saving sort column/order for message list. (bug #141) +▪ Fixed problem with reloading feeds with newly downloaded messages when read-only-visible feeds filter is activated. (bug #139) 3.0.1 ————— diff --git a/src/gui/messagesview.cpp b/src/gui/messagesview.cpp index be30c14a2..1058325b9 100755 --- a/src/gui/messagesview.cpp +++ b/src/gui/messagesview.cpp @@ -559,4 +559,5 @@ void MessagesView::adjustColumns() { void MessagesView::saveSortState(int column, Qt::SortOrder order) { qApp->settings()->setValue(GROUP(GUI), GUI::DefaultSortColumnMessages, column); qApp->settings()->setValue(GROUP(GUI), GUI::DefaultSortOrderMessages, order); + qApp->settings()->sync(); } diff --git a/src/services/standard/standardfeed.cpp b/src/services/standard/standardfeed.cpp index fd48a6364..f7a200997 100755 --- a/src/services/standard/standardfeed.cpp +++ b/src/services/standard/standardfeed.cpp @@ -741,6 +741,10 @@ int StandardFeed::updateMessages(const QList &messages) { else { updateCounts(true); serviceRoot()->itemChanged(QList() << this); + + if (updated_messages > 0) { + serviceRoot()->requestFeedReadFilterReload(); + } } return updated_messages; diff --git a/src/services/standard/standardserviceroot.cpp b/src/services/standard/standardserviceroot.cpp index 33412dd5e..7b30ead52 100755 --- a/src/services/standard/standardserviceroot.cpp +++ b/src/services/standard/standardserviceroot.cpp @@ -64,7 +64,8 @@ StandardServiceRoot::~StandardServiceRoot() { void StandardServiceRoot::start() { loadFromDatabase(); - if (qApp->isFirstRun()) { + if (getSubTree(RootItemKind::Category | RootItemKind::Feed).isEmpty()) { + // In other words, if there are no feeds or categories added. if (MessageBox::show(qApp->mainForm(), QMessageBox::Question, QObject::tr("Load initial set of feeds"), tr("You started %1 for the first time, now you can load initial set of feeds.").arg(APP_NAME), tr("Do you want to load initial set of feeds?"), diff --git a/src/services/tt-rss/ttrssfeed.cpp b/src/services/tt-rss/ttrssfeed.cpp index d4dd74b0c..c131320b2 100755 --- a/src/services/tt-rss/ttrssfeed.cpp +++ b/src/services/tt-rss/ttrssfeed.cpp @@ -380,6 +380,10 @@ int TtRssFeed::updateMessages(const QList &messages) { updateCounts(true); serviceRoot()->itemChanged(QList() << this); + + if (updated_messages > 0) { + serviceRoot()->requestFeedReadFilterReload(); + } } return updated_messages;