push feature stable
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ Future<bool?> showSwitchProfileDialog(
|
||||
icon: const Icon(Icons.warning),
|
||||
title: const Text('Switch User'),
|
||||
content: Text(
|
||||
"Switching to User '$profileName' will require a restart of the Browser.\n\nPrivate tab data will be cleared on restart.",
|
||||
"Switching to User '$profileName' will require a restart of the Browser. Web notifications for the inactive profile will be paused.\n\nPrivate tab data will be cleared on restart.",
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
actions: [
|
||||
|
||||
+10
-3
@@ -55,9 +55,16 @@ Future<void> handleSwitchProfile(
|
||||
);
|
||||
|
||||
if (shouldSwitch == true) {
|
||||
await ref
|
||||
.read(profileRepositoryProvider.notifier)
|
||||
.switchProfile(profile.id);
|
||||
try {
|
||||
await ref
|
||||
.read(profileRepositoryProvider.notifier)
|
||||
.switchProfile(profile.id);
|
||||
} catch (error) {
|
||||
if (context.mounted) {
|
||||
ui_helper.showErrorMessage(context, 'Could not switch profile: $error');
|
||||
}
|
||||
return;
|
||||
}
|
||||
await exitApp(ref.container);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user