diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/sheets/view_tabs.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/sheets/view_tabs.dart index 7e172672..a86e5ad6 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/sheets/view_tabs.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/sheets/view_tabs.dart @@ -186,11 +186,39 @@ class _TabSheetHeader extends HookConsumerWidget { TextButton.icon( onPressed: () async { final container = ref.read(selectedContainerProvider); + final result = await showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('Close All Tabs'), + content: Text( + (container != null) + ? 'Are you sure you want to close all container tabs?' + : 'Are you sure you want to close all unassigned tabs?', + ), + actions: [ + TextButton( + onPressed: () { + Navigator.pop(context, false); + }, + child: const Text('Cancel'), + ), + TextButton( + onPressed: () { + Navigator.pop(context, true); + }, + child: const Text('Close'), + ), + ], + ); + }, + ); + + if (result == true) { await ref .read(tabDataRepositoryProvider.notifier) .closeAllTabsByContainer(container); - - onClose(); + } }, icon: const Icon(MdiIcons.closeBoxMultiple), label: const Text('Close All'),