Wait until bottom sheet closes before adding the reaction (#6299)

This commit is contained in:
Elias Nahum 2022-05-20 13:23:38 -04:00 committed by GitHub
parent e883186fde
commit b0e425ce07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,9 +49,9 @@ const ReactionBar = ({recentEmojis = [], postId}: QuickReactionProps) => {
const isSmallDevice = width < SMALL_ICON_BREAKPOINT;
const styles = getStyleSheet(theme);
const handleEmojiPress = useCallback((emoji: string) => {
const handleEmojiPress = useCallback(async (emoji: string) => {
await dismissBottomSheet(Screens.POST_OPTIONS);
addReaction(serverUrl, postId, emoji);
dismissBottomSheet(Screens.POST_OPTIONS);
}, [postId, serverUrl]);
const openEmojiPicker = useCallback(async () => {