fix: Show bootstrap dialog in the appropriate places

This commit is contained in:
Sorunome 2021-11-19 09:22:43 +01:00
commit 7a08592a1e
3 changed files with 33 additions and 42 deletions

View file

@ -92,25 +92,7 @@ class SettingsSecurityController extends State<SettingsSecurity> {
}
}
void bootstrapSettingsAction() async {
if (await Matrix.of(context).client.encryption.keyManager.isCached()) {
if (OkCancelResult.ok ==
await showOkCancelAlertDialog(
useRootNavigator: false,
context: context,
title: L10n.of(context).keysCached,
message: L10n.of(context).wipeChatBackup,
isDestructiveAction: true,
okLabel: L10n.of(context).ok,
cancelLabel: L10n.of(context).cancel,
)) {
await BootstrapDialog(
client: Matrix.of(context).client,
wipe: true,
).show(context);
}
return;
}
void showBootstrapDialog(BuildContext context) async {
await BootstrapDialog(
client: Matrix.of(context).client,
).show(context);