chore: Display warning when logout without backup
This commit is contained in:
parent
a0baa747ca
commit
c089262ea9
4 changed files with 14 additions and 8 deletions
|
|
@ -58,11 +58,14 @@ class SettingsController extends State<Settings> {
|
|||
}
|
||||
|
||||
void logoutAction() async {
|
||||
final noBackup = showChatBackupBanner == true;
|
||||
if (await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
context: context,
|
||||
title: L10n.of(context)!.areYouSureYouWantToLogout,
|
||||
okLabel: L10n.of(context)!.yes,
|
||||
message: L10n.of(context)!.noBackupWarning,
|
||||
isDestructiveAction: noBackup,
|
||||
okLabel: L10n.of(context)!.logout,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
) ==
|
||||
OkCancelResult.cancel) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue