diff --git a/app/components/post_draft/custom_emoji_picker/index.tsx b/app/components/post_draft/custom_emoji_picker/index.tsx index f88f6b442e..1b511843df 100644 --- a/app/components/post_draft/custom_emoji_picker/index.tsx +++ b/app/components/post_draft/custom_emoji_picker/index.tsx @@ -35,15 +35,17 @@ const CustomEmojiPicker: React.FC = ({ useEffect(() => { const closeEmojiPicker = DeviceEventEmitter.addListener(Events.CLOSE_EMOJI_PICKER, () => { - height.value = withTiming(0, { - duration: 100, - easing: Easing.inOut(Easing.ease), - // eslint-disable-next-line max-nested-callbacks - }, (finished) => { - if (finished) { - runOnJS(setIsEmojiPickerOpen)(false); - } - }); + if (!isEmojiSearchFocused) { + height.value = withTiming(0, { + duration: 300, + easing: Easing.inOut(Easing.ease), + // eslint-disable-next-line max-nested-callbacks + }, (finished) => { + if (finished) { + runOnJS(setIsEmojiPickerOpen)(false); + } + }); + } }); return () => { diff --git a/app/components/post_list/post/post.tsx b/app/components/post_list/post/post.tsx index a0c5ec02e6..6c03bf0da6 100644 --- a/app/components/post_list/post/post.tsx +++ b/app/components/post_list/post/post.tsx @@ -3,11 +3,12 @@ import React, {type ReactNode, useEffect, useMemo, useRef, useState} from 'react'; import {useIntl} from 'react-intl'; -import {Keyboard, Platform, type StyleProp, View, type ViewStyle, TouchableHighlight} from 'react-native'; +import {Keyboard, Platform, type StyleProp, View, type ViewStyle, TouchableHighlight, DeviceEventEmitter} from 'react-native'; import {removePost} from '@actions/local/post'; import {showPermalink} from '@actions/remote/permalink'; import {fetchAndSwitchToThread} from '@actions/remote/thread'; +import {Events} from '@app/constants'; import CallsCustomMessage from '@calls/components/calls_custom_message'; import {isCallsCustomMessage} from '@calls/utils'; import SystemAvatar from '@components/system_avatar'; @@ -202,6 +203,7 @@ const Post = ({ if (post) { Keyboard.dismiss(); + DeviceEventEmitter.emit(Events.CLOSE_EMOJI_PICKER); setTimeout(handlePostPress, 300); }