Skip to content

Fix unread badge counting from inactive accounts when notifyFromAll is disabled. Fix #26938#30289

Open
trollkotze wants to merge 1 commit intotelegramdesktop:devfrom
trollkotze:fix/unread-badge-for-inactive-accounts
Open

Fix unread badge counting from inactive accounts when notifyFromAll is disabled. Fix #26938#30289
trollkotze wants to merge 1 commit intotelegramdesktop:devfrom
trollkotze:fix/unread-badge-for-inactive-accounts

Conversation

@trollkotze
Copy link

…ce, no prefix convention visible in their history) and includes the issue-closing keyword as required.Fixes #26938
Domain::updateUnreadBadge() unconditionally summed unread counts from all accounts. When notifyFromAll is disabled, it now skips inactive accounts, so the badge only reflects the active account's unreads.
Also triggers a badge recalculation when switching accounts (since the set of counted accounts changes), and when toggling the setting itself.
Changes

  • main_domain.cpp: In updateUnreadBadge(), skip non-active accounts when notifyFromAll is off.
  • main_domain.cpp: In activate(), schedule a badge update on account switch when notifyFromAll is off.
  • settings_notifications.cpp: Call notifyUnreadBadgeChanged() when the setting is toggled so the badge updates immediately.
    Note on Receiving notifications from another account despite the setting being disabled #26938
    The issue was closed as intended behavior (Receiving notifications from another account despite the setting being disabled #26938 (comment)), with the reasoning that the "Notify from all accounts" setting was only meant to control desktop notifications, not badge counters.
    I've read that and I'm ignoring it, because I think that tthis intention was stupid. A setting called "Notify from all accounts" that still counts unreads from all accounts in the badge is unintuitive — the badge is a notification. If this was intentional, the intention lacked common sense. Over two years have passed since that decision, and intentions can change. I'm opening this PR in the hope the maintainers will reconsider.
…ce, no prefix convention visible in their history) and includes the issue-closing keyword as required.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 15, 2026

Fixes #26938

You could notice it's told there that this is intended behavior...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants