🐛 Fixes notification wrong bubble count
This commit is contained in:
parent
75097ab6fc
commit
cb991d1574
@ -47,8 +47,9 @@ class NotificationUnreadCountNotifier
|
|||||||
void _subscribeToWebSocket() {
|
void _subscribeToWebSocket() {
|
||||||
final webSocketService = ref.read(websocketProvider);
|
final webSocketService = ref.read(websocketProvider);
|
||||||
_subscription = webSocketService.dataStream.listen((packet) {
|
_subscription = webSocketService.dataStream.listen((packet) {
|
||||||
if (packet.type == 'notifications.new') {
|
if (packet.type == 'notifications.new' && packet.data != null) {
|
||||||
_incrementCounter();
|
final notification = SnNotification.fromJson(packet.data!);
|
||||||
|
if (notification.topic != 'messages.new') _incrementCounter();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user