From 7448c8f78588e417d7daedd8828f8dc15a4a9858 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sun, 5 May 2024 01:13:57 +0100 Subject: [PATCH] =?UTF-8?q?[=F0=9F=90=B4]=20Improve=20message=20pressing?= =?UTF-8?q?=20(#3864)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 61d039a7024c27583aed7d1e9f1ff5b919dc7d30. --- src/components/dms/ActionsWrapper.tsx | 3 ++- src/screens/Messages/Conversation/MessagesList.tsx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/dms/ActionsWrapper.tsx b/src/components/dms/ActionsWrapper.tsx index 107e5eb8e9..19a3e0424b 100644 --- a/src/components/dms/ActionsWrapper.tsx +++ b/src/components/dms/ActionsWrapper.tsx @@ -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, @@ -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]) diff --git a/src/screens/Messages/Conversation/MessagesList.tsx b/src/screens/Messages/Conversation/MessagesList.tsx index b96dbd95b6..e00cf11cd8 100644 --- a/src/screens/Messages/Conversation/MessagesList.tsx +++ b/src/screens/Messages/Conversation/MessagesList.tsx @@ -225,6 +225,7 @@ export function MessagesList() { initialNumToRender={isWeb ? 50 : 25} maxToRenderPerBatch={isWeb ? 50 : 25} keyboardDismissMode="on-drag" + keyboardShouldPersistTaps="handled" maintainVisibleContentPosition={{ minIndexForVisible: 1, }}