mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 14:59:29 +01:00
fix: App crashes on account switch
This commit is contained in:
parent
2c8a1803cf
commit
c3f30a317e
@ -25,7 +25,6 @@ class ChatListViewBody extends StatefulWidget {
|
|||||||
class _ChatListViewBodyState extends State<ChatListViewBody> {
|
class _ChatListViewBodyState extends State<ChatListViewBody> {
|
||||||
// the matrix sync stream
|
// the matrix sync stream
|
||||||
late StreamSubscription _subscription;
|
late StreamSubscription _subscription;
|
||||||
late StreamSubscription _clientSubscription;
|
|
||||||
|
|
||||||
// used to check the animation direction
|
// used to check the animation direction
|
||||||
String? _lastUserId;
|
String? _lastUserId;
|
||||||
@ -40,8 +39,6 @@ class _ChatListViewBodyState extends State<ChatListViewBody> {
|
|||||||
.where((s) => s.hasRoomUpdate)
|
.where((s) => s.hasRoomUpdate)
|
||||||
.rateLimit(const Duration(seconds: 1))
|
.rateLimit(const Duration(seconds: 1))
|
||||||
.listen((d) => setState(() {}));
|
.listen((d) => setState(() {}));
|
||||||
_clientSubscription =
|
|
||||||
widget.controller.clientStream.listen((d) => setState(() {}));
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +186,6 @@ class _ChatListViewBodyState extends State<ChatListViewBody> {
|
|||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_subscription.cancel();
|
_subscription.cancel();
|
||||||
_clientSubscription.cancel();
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user