Skip to content

Commit

Permalink
[🐴] Improve message pressing (#3864)
Browse files Browse the repository at this point in the history
* 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 61d039a.
  • Loading branch information
mozzius authored May 5, 2024
1 parent 91f8202 commit 7448c8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/dms/ActionsWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useCallback} from 'react'
import {Pressable, View} from 'react-native'
import {Keyboard, Pressable, View} from 'react-native'
import Animated, {
cancelAnimation,
runOnJS,
Expand Down Expand Up @@ -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
// function
const open = useCallback(() => {
Keyboard.dismiss()
menuControl.open()
}, [menuControl])

Expand Down
1 change: 1 addition & 0 deletions src/screens/Messages/Conversation/MessagesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export function MessagesList() {
initialNumToRender={isWeb ? 50 : 25}
maxToRenderPerBatch={isWeb ? 50 : 25}
keyboardDismissMode="on-drag"
keyboardShouldPersistTaps="handled"
maintainVisibleContentPosition={{
minIndexForVisible: 1,
}}
Expand Down

0 comments on commit 7448c8f

Please sign in to comment.