diff --git a/src/view/screens/Search/Search.tsx b/src/view/screens/Search/Search.tsx
index a0dec77880..b487a555a0 100644
--- a/src/view/screens/Search/Search.tsx
+++ b/src/view/screens/Search/Search.tsx
@@ -453,11 +453,14 @@ function useQueryManager({initialQuery}: {initialQuery: string}) {
}
let SearchScreenInner = ({
- query: initialQuery,
+ query,
+ queryWithParams,
+ headerHeight,
}: {
query: string
+ queryWithParams: string
+ headerHeight: number
}): React.ReactNode => {
- const t = useThemeNew()
const pal = usePalette('default')
const setMinimalShellMode = useSetMinimalShellMode()
const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled()
@@ -465,9 +468,6 @@ let SearchScreenInner = ({
const {isDesktop} = useWebMediaQueries()
const [activeTab, setActiveTab] = React.useState(0)
const {_} = useLingui()
- const {gtMobile} = useBreakpoints()
-
- const {params, query, queryWithParams} = useQueryManager({initialQuery})
const onPageSelected = React.useCallback(
(index: number) => {
@@ -517,40 +517,25 @@ let SearchScreenInner = ({
}, [_, query, queryWithParams, activeTab])
return query ? (
- <>
-
-
-
-
-
-
-
-
- (
-
- section.title)} {...props} />
-
- )}
- initialPage={0}>
- {sections.map((section, i) => (
- {section.component}
- ))}
-
- >
+ (
+
+ section.title)} {...props} />
+
+ )}
+ initialPage={0}>
+ {sections.map((section, i) => (
+ {section.component}
+ ))}
+
) : hasSession ? (
) : (
@@ -819,59 +804,78 @@ export function SearchScreen(
[selectedProfiles],
)
+ const {params, query, queryWithParams} = useQueryManager({
+ initialQuery: queryParam,
+ })
+ const showFilters = Boolean(query && !showAutocomplete)
+ const headerHeight = HEADER_HEIGHT + (showFilters ? 40 : 0)
+
return (
- {!gtMobile && (
-
- )}
-
- {showAutocomplete && (
-
+
+ {!gtMobile && (
+
+ )}
+
+ {showAutocomplete && (
+
+ )}
+
+
+ {query && !showAutocomplete && (
+
+
+
+
+
)}
@@ -905,7 +909,12 @@ export function SearchScreen(
display: showAutocomplete ? 'none' : 'flex',
flex: 1,
}}>
-
+
)
@@ -1233,7 +1242,6 @@ const styles = StyleSheet.create({
tabBarContainer: {
// @ts-ignore web only
position: isWeb ? 'sticky' : '',
- top: isWeb ? HEADER_HEIGHT : 0,
zIndex: 1,
},
searchHistoryContainer: {