Browse Source
Fix critical bug where NotificationContent deserializer was corrupting notification data every time storage was loaded: 1. Deserializer was creating new NotificationContent() which: - Generated new random UUIDs (losing original IDs) - Set fetchedAt to current time (losing original timestamps) - Caused excessive debug logging (40+ log lines per load) 2. This caused: - Notifications to appear as 'new' on every app restart - Duplicate notification detection to fail (different IDs) - Log spam making debugging difficult - 40+ notifications accumulating over time Changes: - Add package-private constructor NotificationContent(id, fetchedAt) to preserve original data during deserialization - Update NotificationContentDeserializer to read fetchedAt from JSON and use new constructor to preserve original values - Remove excessive constructor logging that caused log spam - Preserve notification IDs during deserialization This ensures notifications maintain their original identity and timestamps when loaded from persistent storage, preventing data corruption and duplicate accumulation. Fixes issue where prefetch correctly skipped but 40+ notifications accumulated due to deserializer corruption.master
1 changed files with 25 additions and 6 deletions
Loading…
Reference in new issue