Skip to content

Reaction: Fix popup appearing twice when opening AirPods case#411

Merged
d4rken merged 1 commit intomainfrom
fix/popup-flicker-on-case-open
Feb 25, 2026
Merged

Reaction: Fix popup appearing twice when opening AirPods case#411
d4rken merged 1 commit intomainfrom
fix/popup-flicker-on-case-open

Conversation

@d4rken
Copy link
Copy Markdown
Member

@d4rken d4rken commented Feb 24, 2026

What changed

  • Opening the AirPods case no longer causes the popup to briefly flash and reappear. The popup updates smoothly in place when new device data arrives.

Technical Context

  • On low-latency scan mode, two popup triggers (connection and case-open) fire within ~400ms, causing the overlay to be torn down and recreated, producing a visible flicker.
  • PopUpWindow.show() now updates the existing popup's device data in place via Compose MutableState instead of destroying and recreating the overlay.
  • Extracted a shared teardown helper to deduplicate lifecycle cleanup between show() and close() paths.

When two popup triggers fire in rapid succession (e.g. connection + case open),
the overlay is now updated via Compose MutableState rather than torn down and
recreated, eliminating the visual flicker.
@d4rken d4rken added the bug Something isn't working label Feb 24, 2026
@d4rken d4rken merged commit e2d127d into main Feb 25, 2026
9 checks passed
@d4rken d4rken deleted the fix/popup-flicker-on-case-open branch February 25, 2026 08:55
@d4rken d4rken changed the title fix(popup): Fix double popup flicker when opening AirPods case Reaction: Fix popup appearing twice when opening AirPods case Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant