fix: display a nicer toast
This commit is contained in:
parent
59f9a9f447
commit
0b4498e9d8
2 changed files with 7 additions and 8 deletions
|
|
@ -1557,6 +1557,7 @@
|
|||
"placeholders": {}
|
||||
},
|
||||
"openCamera": "Open camera",
|
||||
"oneClientLoggedOut": "One of your clients has been logged out",
|
||||
"@openCamera": {
|
||||
"type": "text",
|
||||
"placeholders": {}
|
||||
|
|
|
|||
|
|
@ -419,15 +419,13 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
_cancelSubs(c.clientName);
|
||||
widget.clients.remove(c);
|
||||
}
|
||||
if (loggedInWithMultipleClients) {
|
||||
// TODO: display a nicer toast
|
||||
showOkAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: navigatorContext,
|
||||
title: 'Login state of client $name changed',
|
||||
message: 'New login state: $state',
|
||||
okLabel: L10n.of(widget.context).ok,
|
||||
if (loggedInWithMultipleClients && state != LoginState.loggedIn) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(L10n.of(context).oneClientLoggedOut),
|
||||
),
|
||||
);
|
||||
|
||||
if (state != LoginState.loggedIn) {
|
||||
widget.router.currentState.to(
|
||||
'/rooms',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue