From 3ae2e949952ee95fad58720f5ece5a5397be4de8 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Tue, 1 Jul 2025 22:41:05 +0200 Subject: [PATCH] hide tree view on search --- .../browser/presentation/controllers/tree_view.dart | 6 ++++++ .../browser/presentation/widgets/sheets/view_tabs.dart | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/app/lib/features/geckoview/features/browser/presentation/controllers/tree_view.dart b/app/lib/features/geckoview/features/browser/presentation/controllers/tree_view.dart index cc1ed6ea..efdd96b8 100644 --- a/app/lib/features/geckoview/features/browser/presentation/controllers/tree_view.dart +++ b/app/lib/features/geckoview/features/browser/presentation/controllers/tree_view.dart @@ -8,6 +8,12 @@ class TreeViewController extends _$TreeViewController { state = !state; } + void hide() { + if (state) { + state = false; + } + } + @override bool build() { return false; 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 e284fcdb..cfcb5bdf 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 @@ -74,6 +74,10 @@ class _TabSheetHeader extends HookConsumerWidget { iconSize: 18, padding: EdgeInsets.zero, onPressed: () { + ref + .read(treeViewControllerProvider.notifier) + .hide(); + searchMode.value = true; searchTextFocus.requestFocus(); },