Repository navigation
fix(notification): resolve countdown popup repeatedly showing by using reschedule instead of onTimeout - #1778
Draft
18202781743 wants to merge 1 commit into
Draft
18202781743 wants to merge 1 commit into
18202781743 wants to merge 1 commit into
Conversation
…move/setBlockId to prevent repeated popup When a notification replaces an existing one (push), is removed (remove), or has its block ID changed (setBlockId), the code incorrectly called onTimeout(). This caused the timer's timeout handler to fire, which emits the expired signal for the nearest-deadline notification, closing its bubble. The bubble then gets re-created, appearing as a repeated popup. Fix: extract the timer-rescheduling logic from onTimeout() into a new reschedule() method. Call reschedule() instead of onTimeout() in push(), remove(), and setBlockId() so the timer is adjusted without triggering premature expiration.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR fixes repeatedly appearing countdown popups by ensuring updates to pending expiration entities only reschedule the timer and do not process entries as expired; actual expiration remains handled exclusively by the timer timeout path. Sequence diagram for notification expiration reschedulingsequenceDiagram
participant Notification as Notification
participant ExpireTimer as ExpireTimer
participant QTimer as QTimer
participant Bubble as NotificationBubble
Notification->>ExpireTimer: push(entity)
ExpireTimer->>ExpireTimer: reschedule()
ExpireTimer->>QTimer: start()
Note over ExpireTimer,Bubble: Pending entities are updated without emitting expired
QTimer-->>ExpireTimer: timeout()
ExpireTimer->>ExpireTimer: onTimeout()
ExpireTimer-->>Bubble: expired(id, bubbleId)
ExpireTimer->>ExpireTimer: reschedule()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Ivy233
marked this pull request as draft
October 22, 2026 11:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root Cause
ExpireTimer::push()/remove()/setBlockId()incorrectly calledonTimeout()after modifying the pending entities list.onTimeout()processes expired entries and emits theexpiredsignal, which closes notification bubbles prematurely. When a replacement notification arrives,push()triggersonTimeout(), which closes the current bubble. The next replacement creates a new bubble, resulting in the countdown popup repeatedly appearing.Fix
Extract the timer-rescheduling logic (stop timer / sort by nearest deadline / start timer) from the end of
onTimeout()into a newreschedule()method. ReplaceonTimeout()calls inpush(),remove(), andsetBlockId()withreschedule()so the timer is adjusted without triggering premature expiration processing.onTimeout()itself remains unchanged (still triggered byQTimer::timeout), with its tail callingreschedule().Related
Summary by Sourcery
Prevent premature notification expiration while updating pending countdown timers.
Bug Fixes:
Enhancements: