feat: from:me search syntax
This commit is contained in:
parent
17f7c36edf
commit
7f4d3dc999
2 changed files with 31 additions and 2 deletions
|
@ -47,6 +47,7 @@ import {useSetMinimalShellMode, useSetDrawerSwipeDisabled} from '#/state/shell'
|
|||
import {isWeb} from '#/platform/detection'
|
||||
import {listenSoftReset} from '#/state/events'
|
||||
import {s} from '#/lib/styles'
|
||||
import {augmentSearchQuery} from '#/lib/strings/helpers'
|
||||
|
||||
function Loader() {
|
||||
const pal = usePalette('default')
|
||||
|
@ -315,9 +316,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)
|
||||
|
@ -338,7 +343,7 @@ export function SearchScreenInner({
|
|||
)}
|
||||
initialPage={0}>
|
||||
<View>
|
||||
<SearchScreenPostResults query={query} />
|
||||
<SearchScreenPostResults query={augmentedQuery} />
|
||||
</View>
|
||||
<View>
|
||||
<SearchScreenUserResults query={query} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue