[🐴] Improve message pressing (#3864)
* allow tapping message when keyboard open
* dismiss keyboard on open msg menu
* show message info on press
* Revert "show message info on press"
This reverts commit 61d039a702.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React, {useCallback} from 'react'
|
import React, {useCallback} from 'react'
|
||||||
import {Pressable, View} from 'react-native'
|
import {Keyboard, Pressable, View} from 'react-native'
|
||||||
import Animated, {
|
import Animated, {
|
||||||
cancelAnimation,
|
cancelAnimation,
|
||||||
runOnJS,
|
runOnJS,
|
||||||
@@ -38,6 +38,7 @@ export function ActionsWrapper({
|
|||||||
// Reanimated's `runOnJS` doesn't like refs, so we can't use `runOnJS(menuControl.open)()`. Instead, we'll use this
|
// Reanimated's `runOnJS` doesn't like refs, so we can't use `runOnJS(menuControl.open)()`. Instead, we'll use this
|
||||||
// function
|
// function
|
||||||
const open = useCallback(() => {
|
const open = useCallback(() => {
|
||||||
|
Keyboard.dismiss()
|
||||||
menuControl.open()
|
menuControl.open()
|
||||||
}, [menuControl])
|
}, [menuControl])
|
||||||
|
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ export function MessagesList() {
|
|||||||
initialNumToRender={isWeb ? 50 : 25}
|
initialNumToRender={isWeb ? 50 : 25}
|
||||||
maxToRenderPerBatch={isWeb ? 50 : 25}
|
maxToRenderPerBatch={isWeb ? 50 : 25}
|
||||||
keyboardDismissMode="on-drag"
|
keyboardDismissMode="on-drag"
|
||||||
|
keyboardShouldPersistTaps="handled"
|
||||||
maintainVisibleContentPosition={{
|
maintainVisibleContentPosition={{
|
||||||
minIndexForVisible: 1,
|
minIndexForVisible: 1,
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user