Page MenuHomePhabricator

D7942.id26940.diff
No OneTemporary

D7942.id26940.diff

diff --git a/native/chat/text-message-tooltip-modal.react.js b/native/chat/text-message-tooltip-modal.react.js
--- a/native/chat/text-message-tooltip-modal.react.js
+++ b/native/chat/text-message-tooltip-modal.react.js
@@ -6,6 +6,7 @@
import { createMessageReply } from 'lib/shared/message-utils.js';
+import { useNavigateToThread } from './message-list-types.js';
import { useOnPressReport } from './message-report-utils.js';
import { useAnimatedNavigateToSidebar } from './sidebar-navigation.js';
import TextMessageTooltipButton from './text-message-tooltip-button.react.js';
@@ -34,20 +35,24 @@
props: TooltipMenuProps<'TextMessageTooltipModal'>,
): React.Node {
const { route, tooltipItem: TooltipItem } = props;
+ const { threadInfo } = route.params.item;
const overlayContext = React.useContext(OverlayContext);
const inputState = React.useContext(InputStateContext);
const { text } = route.params.item.messageInfo;
+ const navigateToThread = useNavigateToThread();
+
const onPressReply = React.useCallback(() => {
invariant(
inputState,
'inputState should be set in TextMessageTooltipModal.onPressReply',
);
+ navigateToThread({ threadInfo });
inputState.editInputMessage({
message: createMessageReply(text),
mode: 'prepend',
});
- }, [inputState, text]);
+ }, [inputState, navigateToThread, threadInfo, text]);
const renderReplyIcon = React.useCallback(
style => <CommIcon name="reply" style={style} size={12} />,
[],
diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js
--- a/native/navigation/route-names.js
+++ b/native/navigation/route-names.js
@@ -236,4 +236,5 @@
ComposeSubchannelRouteName,
FullScreenThreadMediaGalleryRouteName,
MessageResultsScreenRouteName,
+ MessageSearchRouteName,
];

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 7:13 AM (20 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599858
Default Alt Text
D7942.id26940.diff (1 KB)

Event Timeline