🐛 Trying to fix stream already listen

This commit is contained in:
2025-02-07 21:30:52 +08:00
parent 167c11b9eb
commit a2d2ce4d38
4 changed files with 11 additions and 8 deletions

View File

@ -77,7 +77,7 @@ class NotificationProvider extends ChangeNotifier {
List<SnNotification> notifications = List.empty(growable: true);
void listen() {
_ws.stream.stream.listen((event) {
_ws.pk.stream.listen((event) {
if (event.method == 'notifications.new') {
final notification = SnNotification.fromJson(event.payload!);
if (showingCount < 0) showingCount = 0;