From ffb4045cafade375b55084b7a9e01ce0579d1f38 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 12 Jun 2023 13:10:51 +0200 Subject: [PATCH] rename job --- .github/workflows/rssguard.yml | 4 +-- .../services/abstract/serviceroot.cpp | 32 ++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rssguard.yml b/.github/workflows/rssguard.yml index 4f5c808e6..f17f2cfeb 100644 --- a/.github/workflows/rssguard.yml +++ b/.github/workflows/rssguard.yml @@ -70,8 +70,8 @@ jobs: ./rssguard-build/rssguard-*mac64.dmg ./rssguard-build/rssguard-*linux64.AppImage - dist_binaries: - name: Distribute binaries + dist-binaries: + name: distribute-binaries needs: - build-rssguard runs-on: ubuntu-22.04 diff --git a/src/librssguard/services/abstract/serviceroot.cpp b/src/librssguard/services/abstract/serviceroot.cpp index e1c0aece1..82c51aea7 100644 --- a/src/librssguard/services/abstract/serviceroot.cpp +++ b/src/librssguard/services/abstract/serviceroot.cpp @@ -775,6 +775,14 @@ bool ServiceRoot::onAfterSetMessagesRead(RootItem* selected_item, Q_UNUSED(messages) Q_UNUSED(read) + // TODO: We know that some messages were marked as read or unread, therefore we do not need to recount + // all items, but only some: + // - feeds of those messages (if recycle bin is NOT selected) + // - recycle bin (if recycle bin IS selected) + // - important articles (if some messages IS important AND recycle bin is NOT selected) + // - unread articles (if some messages IS unread AND recycle bin is NOT selected) + // - labels assigned to articles (if recycle bin is NOT selected) + updateCounts(true); itemChanged(getSubTree()); return true; @@ -815,8 +823,16 @@ bool ServiceRoot::onAfterSwitchMessageImportance(RootItem* selected_item, const Q_UNUSED(selected_item) Q_UNUSED(changes) - updateCounts(true); - itemChanged(getSubTree()); + // NOTE: We know that some messages were marked as starred or unstarred. Starred count + // is not displayed anywhere in feed list except "Important articles" item. + auto in = importantNode(); + + if (in != nullptr) { + + in->updateCounts(true); + itemChanged({in}); + } + return true; } @@ -830,6 +846,14 @@ bool ServiceRoot::onAfterMessagesDelete(RootItem* selected_item, const QList& labe Q_UNUSED(messages) Q_UNUSED(assign) - boolinq::from(labels).for_each([](Label* lbl) { + for (Label* lbl : labels) { lbl->updateCounts(true); - }); + }; auto list = boolinq::from(labels) .select([](Label* lbl) {