diff options
author | Ansh <anshnanda10@gmail.com> | 2023-07-06 18:41:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-06 20:41:27 -0500 |
commit | df7552135a50d715a50ab592874eb84fc7c8bbcf (patch) | |
tree | bc107dec5ee45a57d3e97980136eb9a7dabfda1d /src/view/screens/PostThread.tsx | |
parent | bf1785765d47c08d7f04c50b3bfd6c04a1bc795b (diff) | |
download | voidsky-df7552135a50d715a50ab592874eb84fc7c8bbcf.tar.zst |
[APP-703] Android horizontal scroll registers as tap (#960)
* use Touchables from react-native-gesture-handler * upgrade `react-native-gesture-handler` to latest version * add FixedTouchableHighlight for android * add workaround comment * wait for animations to complete before loading data * downgrade RNGH back to the version we had
Diffstat (limited to 'src/view/screens/PostThread.tsx')
-rw-r--r-- | src/view/screens/PostThread.tsx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/view/screens/PostThread.tsx b/src/view/screens/PostThread.tsx index e3ceb0bef..86b2d3027 100644 --- a/src/view/screens/PostThread.tsx +++ b/src/view/screens/PostThread.tsx @@ -1,5 +1,5 @@ import React, {useMemo} from 'react' -import {StyleSheet, View} from 'react-native' +import {InteractionManager, StyleSheet, View} from 'react-native' import {useFocusEffect} from '@react-navigation/native' import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' import {makeRecordUri} from 'lib/strings/url-helpers' @@ -31,11 +31,15 @@ export const PostThreadScreen = withAuthRequired(({route}: Props) => { React.useCallback(() => { store.shell.setMinimalShellMode(false) const threadCleanup = view.registerListeners() - if (!view.hasLoaded && !view.isLoading) { - view.setup().catch(err => { - store.log.error('Failed to fetch thread', err) - }) - } + + InteractionManager.runAfterInteractions(() => { + if (!view.hasLoaded && !view.isLoading) { + view.setup().catch(err => { + store.log.error('Failed to fetch thread', err) + }) + } + }) + return () => { threadCleanup() } |