🐛 Fixes notification wrong bubble count
This commit is contained in:
parent
75097ab6fc
commit
cb991d1574
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user