🐛 Fix notification services

This commit is contained in:
2024-09-15 17:19:55 +08:00
parent aeaade9590
commit 204df3306e
28 changed files with 25 additions and 4 deletions

View File

@ -118,6 +118,10 @@ class WebSocketProvider extends GetxController {
final packet = NetworkPackage.fromJson(jsonDecode(event));
log('Websocket incoming message: ${packet.method} ${packet.message}');
stream.sink.add(packet);
if (packet.method == 'notifications.new') {
notifications.add(Notification.fromJson(packet.payload!));
notificationUnread.value++;
}
},
onDone: () {
isConnected.value = false;