Skip to content

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

Closed
trollkotze wants to merge 1 commit into
telegramdesktop:devfrom
trollkotze:fix/unread-badge-for-inactive-accounts
Closed

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

Conversation

@trollkotze

Copy link
Copy Markdown

…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
Copy Markdown

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

ilya-fedin commented Feb 15, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #26938

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

@ilya-fedin ilya-fedin closed this Sep 5, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Receiving notifications from another account despite the setting being disabled

3 participants