mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-29 01:22:37 +01:00
fix: display a nicer toast
This commit is contained in:
parent
feb66d6de4
commit
2353bb5c7f
@ -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…
Reference in New Issue
Block a user