diff --git a/src/view/screens/Search/Search.tsx b/src/view/screens/Search/Search.tsx
index f4bbde5671..c9d1df034b 100644
--- a/src/view/screens/Search/Search.tsx
+++ b/src/view/screens/Search/Search.tsx
@@ -503,7 +503,8 @@ let SearchScreenInner = ({
)
const sections = React.useMemo(() => {
- if (!query) return []
+ if (!queryWithParams) return []
+ const noParams = queryWithParams === query
return [
{
title: _(msg`Top`),
@@ -525,22 +526,25 @@ let SearchScreenInner = ({
/>
),
},
- {
+ noParams && {
title: _(msg`People`),
component: (
),
},
- {
+ noParams && {
title: _(msg`Feeds`),
component: (
),
},
- ]
+ ].filter(Boolean) as {
+ title: string
+ component: React.ReactNode
+ }[]
}, [_, query, queryWithParams, activeTab])
- return query ? (
+ return queryWithParams ? (
(
@@ -639,7 +643,7 @@ export function SearchScreen(
const {params, query, queryWithParams} = useQueryManager({
initialQuery: queryParam,
})
- const showFilters = Boolean(query && !showAutocomplete)
+ const showFilters = Boolean(queryWithParams && !showAutocomplete)
/*
* Arbitrary sizing, so guess and check, used for sticky header alignment and
* sizing.