Merge pull request #2778 from krille-chan/krille/logout-on-dismiss-dialog
fix: Getting logged out on dialog dismissed
This commit is contained in:
commit
1b0c4d3f0b
1 changed files with 10 additions and 12 deletions
|
|
@ -65,18 +65,16 @@ class SettingsController extends State<Settings> {
|
|||
Future<void> logoutAction() async {
|
||||
final l10n = L10n.of(context);
|
||||
final matrix = Matrix.of(context);
|
||||
if (await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: l10n.areYouSureYouWantToLogout,
|
||||
message: l10n.noBackupWarning,
|
||||
isDestructive: cryptoIdentityConnected == false,
|
||||
okLabel: l10n.logout,
|
||||
cancelLabel: l10n.cancel,
|
||||
) ==
|
||||
OkCancelResult.cancel) {
|
||||
return;
|
||||
}
|
||||
final consent = await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: l10n.areYouSureYouWantToLogout,
|
||||
message: l10n.noBackupWarning,
|
||||
isDestructive: cryptoIdentityConnected == false,
|
||||
okLabel: l10n.logout,
|
||||
cancelLabel: l10n.cancel,
|
||||
);
|
||||
if (consent != OkCancelResult.ok) return;
|
||||
if (!mounted) return;
|
||||
await showFutureLoadingDialog(
|
||||
context: context,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue