Add confirmation when switching to the React app

This commit is contained in:
Hillel Coren 2023-11-16 13:12:47 +02:00
parent 1e685cb5c4
commit 7252bf81b5
1 changed files with 25 additions and 20 deletions

View File

@ -267,6 +267,10 @@ class _DashboardScreenState extends State<DashboardScreen>
child: IconButton(
tooltip: localization!.enableReactApp,
onPressed: () async {
confirmCallback(
context: context,
message: localization.enableReactApp,
callback: (_) {
final credentials = state.credentials;
final account = state.account
.rebuild((b) => b..setReactAsDefaultAP = true);
@ -288,6 +292,7 @@ class _DashboardScreenState extends State<DashboardScreen>
store.dispatch(StopSaving());
showErrorDialog(message: error as String?);
});
});
},
icon: Icon(MdiIcons.react),
),