mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-25 10:50:40 +01:00
fix: display a nicer toast
This commit is contained in:
parent
feb66d6de4
commit
2353bb5c7f
@ -1557,6 +1557,7 @@
|
|||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"openCamera": "Open camera",
|
"openCamera": "Open camera",
|
||||||
|
"oneClientLoggedOut": "One of your clients has been logged out",
|
||||||
"@openCamera": {
|
"@openCamera": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
@ -419,15 +419,13 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||||||
_cancelSubs(c.clientName);
|
_cancelSubs(c.clientName);
|
||||||
widget.clients.remove(c);
|
widget.clients.remove(c);
|
||||||
}
|
}
|
||||||
if (loggedInWithMultipleClients) {
|
if (loggedInWithMultipleClients && state != LoginState.loggedIn) {
|
||||||
// TODO: display a nicer toast
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
showOkAlertDialog(
|
SnackBar(
|
||||||
useRootNavigator: false,
|
content: Text(L10n.of(context).oneClientLoggedOut),
|
||||||
context: navigatorContext,
|
),
|
||||||
title: 'Login state of client $name changed',
|
|
||||||
message: 'New login state: $state',
|
|
||||||
okLabel: L10n.of(widget.context).ok,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (state != LoginState.loggedIn) {
|
if (state != LoginState.loggedIn) {
|
||||||
widget.router.currentState.to(
|
widget.router.currentState.to(
|
||||||
'/rooms',
|
'/rooms',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user