Fix reaction picker not opening

This commit is contained in:
Danish Ahmed Mirza 2022-07-14 19:25:44 +05:30 committed by Danish
parent b05d876946
commit 28f869a80c
3 changed files with 5 additions and 4 deletions

View File

@ -140,7 +140,7 @@ const ActionSheet = React.memo(
style={{ ...styles.container, ...bottomSheet }}
backgroundStyle={{ backgroundColor: colors.focusedBackground }}
onChange={index => index === -1 && onClose()}
activeOffsetY={[-1, 1]}
activeOffsetY={[-5, 5]}
failOffsetX={[-5, 5]}
{...androidTablet}
>

View File

@ -264,7 +264,8 @@ const MessageActions = React.memo(
// TODO: evaluate unification with IEmoji
onReactionPress(shortname as any, message.id);
} else {
reactionInit(message);
// Wait for the Action Sheet to close before opening reaction picker
setTimeout(() => reactionInit(message), 500);
}
// close actionSheet when click at header
hideActionSheet();

View File

@ -23,7 +23,7 @@ interface IEmojiSearchbarProps {
}
const renderEmoji = (emoji: IEmoji, size: number, baseUrl: string) => {
if (emoji.name) {
if (emoji?.name) {
return <CustomEmoji style={{ height: size, width: size, margin: 4 }} emoji={emoji} baseUrl={baseUrl} />;
}
return <Text style={[styles.searchedEmoji, { fontSize: size }]}>{shortnameToUnicode(`:${emoji}:`)}</Text>;
@ -82,7 +82,7 @@ const EmojiSearchbar = React.forwardRef<TextInput, IEmojiSearchbarProps>(
</View>
)}
// @ts-ignore
keyExtractor={item => item.name || item}
keyExtractor={item => item?.name || item}
contentContainerStyle={styles.emojiListContainer}
keyboardShouldPersistTaps='always'
/>