[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
This commit is contained in:
Ansh 2023-07-06 18:41:27 -07:00 committed by GitHub
parent bf1785765d
commit df7552135a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 9 deletions

View file

@ -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()
}