Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3490135
D6448.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6448.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D6448: [native] introduce canCreateReactionFromMessage prop to Tooltip component
Attached
Detach File
Event Timeline
Log In to Comment