Add "Search in bottom bar" to Settings
Build APK / build (push) Successful in 5m30s

New Settings > Appearance toggle moves Search into the bottom bar and
out of the top bar, so there's only one search entry point on screen.
Tapping it pushes SearchView same as before - it's never highlighted,
since it isn't a real destination.

- Attached: Search becomes the row's last item, styled like any other
  tab but permanently idle.
- Floating: Search gets its own separate, always fully round satellite
  circle beside the bar instead.

Enabling it costs one regular tab: SettingsController.maxVisibleTabs
is now a dynamic getter (defaultMaxVisibleTabs - 1 while the toggle is
on) instead of the old flat constant, re-enforced immediately if the
user already has all 5 slots filled - the same cleanup path used for
a fresh install or an app update that added a new tab.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 22:19:13 -04:00
co-authored by Claude Sonnet 5
parent a70be19f80
commit 58312511c5
11 changed files with 292 additions and 23 deletions
+11 -1
View File
@@ -473,11 +473,20 @@ class _MainShellViewState extends State<MainShellView> {
} else {
final navStyle = NooLayout.navStyle(context);
final bottomBarStyle = settings.bottomBarStyle;
// Picking/offline already override the tab set itself (see
// pinnedTabs above) - Search doesn't belong in either: there's
// nothing to search for a file-picking flow, and Search needs the
// network Offline mode doesn't have.
final showBottomBarSearch = !overrideActive && settings.searchInBottomBar;
scaffold = Scaffold(
backgroundColor: colors.bg,
drawerScrimColor: colors.scrim,
appBar: pickRequest == null
? AppTopBar(style: navStyle, tab: selectedTab)
? AppTopBar(
style: navStyle,
tab: selectedTab,
searchInBottomBar: showBottomBarSearch,
)
: null,
drawer: pickRequest == null ? const AppDrawer() : null,
// Floating needs the body to draw behind the bar's own transparent
@@ -502,6 +511,7 @@ class _MainShellViewState extends State<MainShellView> {
barStyle: bottomBarStyle,
tabs: pinnedTabs,
selectedIndex: pinnedIndex,
onSearchTap: showBottomBarSearch ? () => openSearch(context) : null,
onDestinationSelected: (index) {
final tappedTab = pinnedTabs[index];
if (tappedTab == _currentTab) {