Skip to content

Preserve bubbles when cancelling notifications.#14889

Open
scueZ wants to merge 1 commit into
signalapp:mainfrom
scueZ:preserve-bubbles-on-cancel
Open

Preserve bubbles when cancelling notifications.#14889
scueZ wants to merge 1 commit into
signalapp:mainfrom
scueZ:preserve-bubbles-on-cancel

Conversation

@scueZ

@scueZ scueZ commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Contributor checklist

  • Samsung Galaxy S23, Android 15
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Fixes #14699.

When Signal cancels message notifications — for example after messages are read on a linked device — NotificationManager.cancel() also dismisses any bubble attached to the notification. For users who keep conversations bubbled, reading on another device therefore destroys their bubbles, whereas the system's swipe-dismiss gesture hides the notification but keeps the bubble.

This change re-posts collapsed bubble notifications with BubbleMetadata.setSuppressNotification(true) instead of cancelling them: the notification leaves the shade and the badge is cleared, while the bubble is preserved — matching the platform's swipe-dismiss behavior.

  • Expanded bubbles, and conversations currently on screen, keep their previous behavior.
  • Notifications with bubble metadata but no active bubble (FLAG_BUBBLE not set) are cancelled outright as before.
  • Bubble notifications are reported as "not cancelled" so the message group summary is kept alive; cancelling the summary can cancel its suppressed bubbled children along with it.
  • On API 30, background suppression has no effect, so previous behavior is preserved there.
  • The bubble metadata is re-posted in its original form (intent-based or shortcut-based).

Tested on a Samsung Galaxy S23 (Android 15): collapsed bubbles (1:1 and group) survive cross-device read with the shade entry and badge cleared; expanded bubbles, fullscreen conversations, and non-bubbled notifications behave as before.

Cancelling a notification also dismisses its bubble. Collapsed
bubble notifications are now re-posted with suppression instead,
which clears the shade and badge while keeping the bubble. Bubble
notifications report as not cancelled so the group summary, whose
cancellation can take its bubbled children down with it, is kept
alive.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reading messages on linked device doesn't cause notifications to go away on Android when message bubbling is enabled

1 participant