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 {
|
Future<void> logoutAction() async {
|
||||||
final l10n = L10n.of(context);
|
final l10n = L10n.of(context);
|
||||||
final matrix = Matrix.of(context);
|
final matrix = Matrix.of(context);
|
||||||
if (await showOkCancelAlertDialog(
|
final consent = await showOkCancelAlertDialog(
|
||||||
useRootNavigator: false,
|
useRootNavigator: false,
|
||||||
context: context,
|
context: context,
|
||||||
title: l10n.areYouSureYouWantToLogout,
|
title: l10n.areYouSureYouWantToLogout,
|
||||||
message: l10n.noBackupWarning,
|
message: l10n.noBackupWarning,
|
||||||
isDestructive: cryptoIdentityConnected == false,
|
isDestructive: cryptoIdentityConnected == false,
|
||||||
okLabel: l10n.logout,
|
okLabel: l10n.logout,
|
||||||
cancelLabel: l10n.cancel,
|
cancelLabel: l10n.cancel,
|
||||||
) ==
|
);
|
||||||
OkCancelResult.cancel) {
|
if (consent != OkCancelResult.ok) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
await showFutureLoadingDialog(
|
await showFutureLoadingDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue