chore: Follow up remote logout handling

This commit is contained in:
Christian Kußowski 2026-03-08 11:01:38 +01:00
parent 71bbe4ad74
commit bad0a549cb
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -257,7 +257,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
});
onLogoutSub[name] ??= c.onLoginStateChanged.stream
.where((state) => state == LoginState.loggedOut)
.listen((state) {
.listen((_) {
final loggedInWithMultipleClients = widget.clients.length > 1;
_cancelSubs(c.clientName);
@ -272,11 +272,9 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
).showSnackBar(
SnackBar(content: Text(L10n.of(context).oneClientLoggedOut)),
);
if (state != LoginState.loggedIn) {
FluffyChatApp.router.go('/rooms');
}
return;
}
FluffyChatApp.router.go('/');
});
onUiaRequest[name] ??= c.onUiaRequest.stream.listen(uiaRequestHandler);
if (PlatformInfos.isWeb || PlatformInfos.isLinux) {