Clear notification popups when they're dismissed on the phone, and avoid showing some notifications that are spurious

This commit is contained in:
James Babcock committed 2026-10-14 02:03:51 -07:00
1 parent 42c2d5cd55
commit 63e0d71e2f
16 files changed
+420 -70

No files matched your search

+4
View File
@@ -28,6 +28,10 @@ export function dismissNotification(key: string): boolean { return active?.dismi
export function onAndroidNotificationPosted(listener: (key: string) => void): () => void {
listeners.add(listener); return () => { listeners.delete(listener) }
}
// ANCS removals carry no key and already reach the posted listeners above
// (they hear every change), and an open popup closes on the repaint that follows.
export function onAndroidNotificationRemoved(_listener: (key: string) => void): () => void { return () => {} }
export function onAndroidNotificationsChanged(listener: () => void): () => void { return onAndroidNotificationPosted(listener) }
// ANCS does not provide app icons, so show one for the notification's ANCS
// category; never fetch notification sources or content from a third-party
// icon service. Indexed by CategoryID: Other, IncomingCall, MissedCall,