From 237cbc9ffa195578d3bb6a0cda53c8923e042e6b Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Fri, 30 Jan 2026 03:21:23 +0100 Subject: [PATCH] improve dividers --- .../browser_modules/bottom_app_bar.dart | 5 +- .../widgets/tab_view/tab_view_header.dart | 115 +++++++++--------- 2 files changed, 61 insertions(+), 59 deletions(-) diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/bottom_app_bar.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/bottom_app_bar.dart index 148c9d66..8bece344 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/bottom_app_bar.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/bottom_app_bar.dart @@ -868,8 +868,8 @@ class NavigationMenuButton extends HookConsumerWidget { leadingIcon: const Icon(Icons.refresh), child: const Text('Reload'), ), - if (selectedTabId != null) const Divider(), - if (selectedTabId != null && showNavigationButtons) + if (selectedTabId != null && showNavigationButtons) ...[ + const Divider(), Consumer( builder: (context, ref, child) { final history = ref.watch( @@ -906,6 +906,7 @@ class NavigationMenuButton extends HookConsumerWidget { ); }, ), + ], ], ); } diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_view_header.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_view_header.dart index fcce686c..5c95967d 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_view_header.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_view_header.dart @@ -271,63 +271,6 @@ class TabViewHeader extends HookConsumerWidget { MenuAnchor( controller: tabsActionMenuController, menuChildren: [ - MenuItemButton( - leadingIcon: const Icon(MdiIcons.bookmarkPlusOutline), - child: const Text('Bookmark all'), - onPressed: () async { - final choice = await showBookmarkAllDialog(context); - if (choice == null || !context.mounted) return; - - final containerId = ref.read( - selectedContainerProvider, - ); - - final tabData = await ref - .read(tabDataRepositoryProvider.notifier) - .getContainerTabsData(containerId); - - if (choice == BookmarkAllChoice.fast) { - if (!context.mounted) return; - final folderGuid = await showSelectFolderDialog( - context, - ); - if (folderGuid == null) return; - - final repo = ref.read( - bookmarksRepositoryProvider.notifier, - ); - for (final tab in tabData) { - if (tab.url != null) { - await repo.addBookmark( - parentGuid: folderGuid, - url: tab.url!, - title: tab.title ?? tab.url.toString(), - ); - } - } - - if (context.mounted) { - ui_helper.showInfoMessage( - context, - '${tabData.length} bookmark(s) added', - ); - } - } else { - for (final tab in tabData) { - if (context.mounted) { - await BookmarkEntryAddRoute( - bookmarkInfo: jsonEncode( - BookmarkInfo( - title: tab.title, - url: tab.url.toString(), - ).encode(), - ), - ).push(context); - } - } - } - }, - ), MenuItemButton( leadingIcon: const Icon(MdiIcons.closeCircle), child: const Text('Close All Tabs'), @@ -389,6 +332,64 @@ class TabViewHeader extends HookConsumerWidget { } }, ), + const Divider(), + MenuItemButton( + leadingIcon: const Icon(MdiIcons.bookmarkPlusOutline), + child: const Text('Bookmark all'), + onPressed: () async { + final choice = await showBookmarkAllDialog(context); + if (choice == null || !context.mounted) return; + + final containerId = ref.read( + selectedContainerProvider, + ); + + final tabData = await ref + .read(tabDataRepositoryProvider.notifier) + .getContainerTabsData(containerId); + + if (choice == BookmarkAllChoice.fast) { + if (!context.mounted) return; + final folderGuid = await showSelectFolderDialog( + context, + ); + if (folderGuid == null) return; + + final repo = ref.read( + bookmarksRepositoryProvider.notifier, + ); + for (final tab in tabData) { + if (tab.url != null) { + await repo.addBookmark( + parentGuid: folderGuid, + url: tab.url!, + title: tab.title ?? tab.url.toString(), + ); + } + } + + if (context.mounted) { + ui_helper.showInfoMessage( + context, + '${tabData.length} bookmark(s) added', + ); + } + } else { + for (final tab in tabData) { + if (context.mounted) { + await BookmarkEntryAddRoute( + bookmarkInfo: jsonEncode( + BookmarkInfo( + title: tab.title, + url: tab.url.toString(), + ).encode(), + ), + ).push(context); + } + } + } + }, + ), Consumer( builder: (context, ref, child) { final selectedContainer = ref.watch(