diff --git a/src/screens/Tabs/Shared/Toot.tsx b/src/screens/Tabs/Shared/Toot.tsx index b8566d47..b2ae7535 100644 --- a/src/screens/Tabs/Shared/Toot.tsx +++ b/src/screens/Tabs/Shared/Toot.tsx @@ -77,6 +77,8 @@ const TabSharedToot: React.FC> = ({ const ancestorsCache = useRef<(Mastodon.Status & { _level?: number })[]>() const loaded = useRef(false) const prependContent = async () => { + await new Promise(promise => setTimeout(promise, 128)) + loaded.current = true if (ancestorsCache.current?.length) { @@ -173,14 +175,14 @@ const TabSharedToot: React.FC> = ({ enabled: !toot._remote, staleTime: 0, refetchOnMount: true, - onSuccess: async data => { + onSuccess: data => { if (data.pages[0].body.length < 1) { navigation.goBack() return } if (!remoteQueryEnabled) { - await prependContent() + prependContent() } } } @@ -295,9 +297,7 @@ const TabSharedToot: React.FC> = ({ ) } }, - onSettled: async () => { - await prependContent() - } + onSettled: () => prependContent() } )