fix listeners for thingy

This commit is contained in:
zoe 2022-08-15 23:51:38 +02:00
parent 574562b459
commit 10d1771af9
2 changed files with 5 additions and 4 deletions

View File

@ -24,9 +24,11 @@ class _NotificationsState extends State<Notifications> {
SingleNotif notif = SingleNotif( SingleNotif notif = SingleNotif(
content: jsonDecode(json["payload"]), content: jsonDecode(json["payload"]),
); );
setState(() { if (mounted) {
notifs.insert(0, notif); setState(() {
}); notifs.insert(0, notif);
});
}
} }
}); });
} }

View File

@ -6,7 +6,6 @@ import 'package:loris/pages/notifications/notifications.dart';
import 'package:loris/pages/timeline/timeline.dart'; import 'package:loris/pages/timeline/timeline.dart';
import 'package:loris/pages/settings/settings.dart'; import 'package:loris/pages/settings/settings.dart';
import '../business_logic/websocket.dart' as websocket; import '../business_logic/websocket.dart' as websocket;
import '../pages/timeline/timeline.dart' as tl;
class MainScaffold extends StatefulWidget { class MainScaffold extends StatefulWidget {
const MainScaffold({Key? key}) : super(key: key); const MainScaffold({Key? key}) : super(key: key);