Files
Amber/app
greenart7c3 1ab593b827 Debounce relay stat counter updates to avoid notification rate limit
AmberRelayStats.addSent/addFailed called notify(id=2) synchronously for
every relay event, driven by NostrClientLoggerListener.onSent. Bursts of
relay traffic (7-34 notifies/sec vs Android's ~5/sec per-app limit) made
NotificationManagerService shed the updates, freezing the status
notification on stale text, and wasted a full BigTextStyle build plus
Binder IPC per dropped event.

Route the counter path through a Unit event flow
(MutableSharedFlow, capacity 1, DROP_OLDEST) collected with
debounce(300): a burst collapses into one notification update and the
last tick always renders. No numeric counter, so nothing overflows or
wraps no matter how long the process runs; tryEmit never suspends or
fails on Quartz IO threads. Connection-state updates keep their
existing debounce so connect/disconnect still shows promptly.

Fixes ngit issue nevent1qy28wumn8ghj7un9d3shjtnwva5hgtnyv4mqqg80gw6ushd8jyj6rt8qseup7hngj0xhqa2ms3dvam60lhc760zvkyq6uts9
2026-08-18 08:21:23 -03:00
..
2024-03-01 06:56:32 -03:00
2023-07-26 16:44:33 -03:00
2026-08-14 13:49:04 -03:00