diff --git a/src/screens/Compose/Root/Suggestions.tsx b/src/screens/Compose/Root/Suggestions.tsx index 89439541..b5c8b267 100644 --- a/src/screens/Compose/Root/Suggestions.tsx +++ b/src/screens/Compose/Root/Suggestions.tsx @@ -38,6 +38,7 @@ const ComposeRootSuggestions: React.FC = () => { const { isFetching, data, refetch } = useSearchQuery({ type: mapSchemaToType(), term: composeState.tag?.raw.substring(1), + ...(mapSchemaToType() === 'accounts' && { following: true }), options: { enabled: false } }) useEffect(() => { diff --git a/src/screens/Tabs/Shared/Toot.tsx b/src/screens/Tabs/Shared/Toot.tsx index 7c791e72..2379b634 100644 --- a/src/screens/Tabs/Shared/Toot.tsx +++ b/src/screens/Tabs/Shared/Toot.tsx @@ -275,7 +275,7 @@ const TabSharedToot: React.FC> = ({ setTimeout(() => { flRef.current?.scrollToIndex({ - index: (ancestorsCache.current?.length || 0), + index: ancestorsCache.current?.length || 0, viewOffset: 50 }) }, 50) diff --git a/src/utils/queryHooks/search.ts b/src/utils/queryHooks/search.ts index 95be0875..4f0ca471 100644 --- a/src/utils/queryHooks/search.ts +++ b/src/utils/queryHooks/search.ts @@ -9,6 +9,7 @@ export type QueryKeySearch = [ type?: 'accounts' | 'hashtags' | 'statuses' term?: string limit?: number + following?: boolean } ] @@ -19,7 +20,7 @@ export type SearchResult = { } const queryFunction = async ({ queryKey, meta }: QueryFunctionContext) => { - const { type, term, limit = 10 } = queryKey[1] + const { type, term, limit = 10, following = false } = queryKey[1] if (!term?.length) { return Promise.reject('Empty search term') } @@ -31,7 +32,8 @@ const queryFunction = async ({ queryKey, meta }: QueryFunctionContext