chore: Follow up remote logout handling
This commit is contained in:
parent
71bbe4ad74
commit
bad0a549cb
1 changed files with 3 additions and 5 deletions
|
|
@ -257,7 +257,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||||
});
|
});
|
||||||
onLogoutSub[name] ??= c.onLoginStateChanged.stream
|
onLogoutSub[name] ??= c.onLoginStateChanged.stream
|
||||||
.where((state) => state == LoginState.loggedOut)
|
.where((state) => state == LoginState.loggedOut)
|
||||||
.listen((state) {
|
.listen((_) {
|
||||||
final loggedInWithMultipleClients = widget.clients.length > 1;
|
final loggedInWithMultipleClients = widget.clients.length > 1;
|
||||||
|
|
||||||
_cancelSubs(c.clientName);
|
_cancelSubs(c.clientName);
|
||||||
|
|
@ -272,11 +272,9 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
||||||
).showSnackBar(
|
).showSnackBar(
|
||||||
SnackBar(content: Text(L10n.of(context).oneClientLoggedOut)),
|
SnackBar(content: Text(L10n.of(context).oneClientLoggedOut)),
|
||||||
);
|
);
|
||||||
|
return;
|
||||||
if (state != LoginState.loggedIn) {
|
|
||||||
FluffyChatApp.router.go('/rooms');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
FluffyChatApp.router.go('/');
|
||||||
});
|
});
|
||||||
onUiaRequest[name] ??= c.onUiaRequest.stream.listen(uiaRequestHandler);
|
onUiaRequest[name] ??= c.onUiaRequest.stream.listen(uiaRequestHandler);
|
||||||
if (PlatformInfos.isWeb || PlatformInfos.isLinux) {
|
if (PlatformInfos.isWeb || PlatformInfos.isLinux) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue