From cb991d1574177a6450a522eec63f6d93ef139264 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 20 Jun 2025 01:33:32 +0800 Subject: [PATCH] :bug: Fixes notification wrong bubble count --- lib/screens/notification.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/screens/notification.dart b/lib/screens/notification.dart index 3bab117..9dbae09 100644 --- a/lib/screens/notification.dart +++ b/lib/screens/notification.dart @@ -47,8 +47,9 @@ class NotificationUnreadCountNotifier void _subscribeToWebSocket() { final webSocketService = ref.read(websocketProvider); _subscription = webSocketService.dataStream.listen((packet) { - if (packet.type == 'notifications.new') { - _incrementCounter(); + if (packet.type == 'notifications.new' && packet.data != null) { + final notification = SnNotification.fromJson(packet.data!); + if (notification.topic != 'messages.new') _incrementCounter(); } }); }