Page MenuHomePhabricator

D6448.diff
No OneTemporary

D6448.diff

diff --git a/native/navigation/tooltip.react.js b/native/navigation/tooltip.react.js
--- a/native/navigation/tooltip.react.js
+++ b/native/navigation/tooltip.react.js
@@ -29,6 +29,7 @@
serverCallStateSelector,
} from 'lib/selectors/server-calls';
import { localIDPrefix } from 'lib/shared/message-utils';
+import { useCanCreateReactionFromMessage } from 'lib/shared/reaction-utils';
import type { SetState } from 'lib/types/hook-types';
import type { Dispatch } from 'lib/types/redux-types';
import {
@@ -131,6 +132,7 @@
+actionSheetShown: SharedValue<boolean>,
+hideTooltip: boolean,
+setHideTooltip: SetState<boolean>,
+ +canCreateReactionFromMessage: boolean,
+showEmojiKeyboard: SharedValue<boolean>,
+exitAnimationWorklet: (finished: boolean) => void,
+styles: typeof unboundStyles,
@@ -421,6 +423,7 @@
actionSheetShown,
hideTooltip,
setHideTooltip,
+ canCreateReactionFromMessage,
showEmojiKeyboard,
exitAnimationWorklet,
styles,
@@ -746,6 +749,15 @@
const actionSheetShown = useSharedValue(false);
const [hideTooltip, setHideTooltip] = React.useState<boolean>(false);
+ const threadInfo = props.route.params.item?.threadInfo;
+ invariant(threadInfo, 'threadInfo should be set');
+ const messageInfo = props.route.params.item?.messageInfo;
+ invariant(messageInfo, 'messageInfo should be set');
+ const canCreateReactionFromMessage = useCanCreateReactionFromMessage(
+ threadInfo,
+ messageInfo,
+ );
+
const showEmojiKeyboard = useSharedValue(false);
const goBackCallback = React.useCallback(() => {
@@ -782,6 +794,7 @@
actionSheetShown={actionSheetShown}
hideTooltip={hideTooltip}
setHideTooltip={setHideTooltip}
+ canCreateReactionFromMessage={canCreateReactionFromMessage}
showEmojiKeyboard={showEmojiKeyboard}
exitAnimationWorklet={exitAnimationWorklet}
styles={styles}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 3:10 PM (17 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2677769
Default Alt Text
D6448.diff (1 KB)

Event Timeline