From 3d67cd60b019c336f68340d184f5c68f7ae1f7a9 Mon Sep 17 00:00:00 2001 From: prjanitor Date: Thu, 2 Apr 2026 06:16:46 +0300 Subject: [PATCH] Add null check for notification in ReplaceNotificationEvent handler --- lib/components/overlays/notifications/widgets/listener.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/components/overlays/notifications/widgets/listener.dart b/lib/components/overlays/notifications/widgets/listener.dart index 99ce5ed9..72a9a10c 100644 --- a/lib/components/overlays/notifications/widgets/listener.dart +++ b/lib/components/overlays/notifications/widgets/listener.dart @@ -35,6 +35,10 @@ mixin NotificationServiceListener on State { setState(() {}); case ReplaceNotificationEvent(id: final id, oldId: final oldId): + final UserNotification? notification = service.getNotification(id); + + if (notification == null) return; + onNotificationReplaced(oldId, id); default: break;