mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Refine querying followed tags
This commit is contained in:
@ -2,7 +2,6 @@ import { MenuContainer, MenuRow } from '@components/Menu'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { useAnnouncementQuery } from '@utils/queryHooks/announcement'
|
||||
import { useListsQuery } from '@utils/queryHooks/lists'
|
||||
import { useFollowedTagsQuery } from '@utils/queryHooks/tags'
|
||||
import { useAccountStorage } from '@utils/storage/actions'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@ -13,12 +12,6 @@ const Collections: React.FC = () => {
|
||||
|
||||
const [pageMe, setPageMe] = useAccountStorage.object('page_me')
|
||||
|
||||
useFollowedTagsQuery({
|
||||
options: {
|
||||
onSuccess: data =>
|
||||
setPageMe({ ...pageMe, followedTags: { shown: !!data?.pages?.[0].body?.length } })
|
||||
}
|
||||
})
|
||||
useListsQuery({
|
||||
options: {
|
||||
onSuccess: data => setPageMe({ ...pageMe, lists: { shown: !!data?.length } })
|
||||
|
@ -18,6 +18,7 @@ import { useFiltersQuery } from '@utils/queryHooks/filters'
|
||||
import { useInstanceQuery } from '@utils/queryHooks/instance'
|
||||
import { usePreferencesQuery } from '@utils/queryHooks/preferences'
|
||||
import { useProfileQuery } from '@utils/queryHooks/profile'
|
||||
import { useFollowedTagsQuery } from '@utils/queryHooks/tags'
|
||||
import { setAccount, setGlobalStorage, useGlobalStorage } from '@utils/storage/actions'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import { themes } from '@utils/styles/themes'
|
||||
@ -88,6 +89,7 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
|
||||
usePreferencesQuery({ options: { enabled: !!accountActive } })
|
||||
useFiltersQuery({ options: { enabled: !!accountActive } })
|
||||
useEmojisQuery({ options: { enabled: !!accountActive } })
|
||||
useFollowedTagsQuery({ options: { enabled: !!accountActive } })
|
||||
|
||||
// Callbacks
|
||||
const navigationContainerOnStateChange = () => {
|
||||
|
Reference in New Issue
Block a user