about summary refs log tree commit diff
path: root/src/view
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2024-01-23 15:52:47 -0800
committerPaul Frazee <pfrazee@gmail.com>2024-01-23 15:52:47 -0800
commitc7647b47cf601193af60c5a4c217da93a3ccf5fa (patch)
tree624306bb3f69ca22c6207a1af8e48db501a83737 /src/view
parent6076b8f73056a7cc04904bd0aa4571b17fd4978d (diff)
parent68a439d5705f6e1bf7ae89377347d6b6db05d6e8 (diff)
downloadvoidsky-c7647b47cf601193af60c5a4c217da93a3ccf5fa.tar.zst
Merge branch 'mary-ext-feat/search-from-me' into main
Diffstat (limited to 'src/view')
-rw-r--r--src/view/screens/Search/Search.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/view/screens/Search/Search.tsx b/src/view/screens/Search/Search.tsx
index 80b514e20..df64cc5aa 100644
--- a/src/view/screens/Search/Search.tsx
+++ b/src/view/screens/Search/Search.tsx
@@ -52,6 +52,7 @@ import {isNative, isWeb} from '#/platform/detection'
 import {listenSoftReset} from '#/state/events'
 import {s} from '#/lib/styles'
 import AsyncStorage from '@react-native-async-storage/async-storage'
+import {augmentSearchQuery} from '#/lib/strings/helpers'
 
 function Loader() {
   const pal = usePalette('default')
@@ -318,9 +319,13 @@ export function SearchScreenInner({
   const pal = usePalette('default')
   const setMinimalShellMode = useSetMinimalShellMode()
   const setDrawerSwipeDisabled = useSetDrawerSwipeDisabled()
-  const {hasSession} = useSession()
+  const {hasSession, currentAccount} = useSession()
   const {isDesktop} = useWebMediaQueries()
 
+  const augmentedQuery = React.useMemo(() => {
+    return augmentSearchQuery(query || '', {did: currentAccount?.did})
+  }, [query, currentAccount])
+
   const onPageSelected = React.useCallback(
     (index: number) => {
       setMinimalShellMode(false)
@@ -343,7 +348,7 @@ export function SearchScreenInner({
         )}
         initialPage={0}>
         <View>
-          <SearchScreenPostResults query={query} />
+          <SearchScreenPostResults query={augmentedQuery} />
         </View>
         <View>
           <SearchScreenUserResults query={query} />