[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:
parent
bf1785765d
commit
df7552135a
3 changed files with 74 additions and 9 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue