2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 16640
|
|
|
|
|
// Function ID: 16641
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: MessagePreview
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [19, 7808, 1074, 21, 504, 1115, 16460, 12825, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: default
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 16640 (MessagePreview)
|
2026-10-01 14:13:23 +00:00
|
|
|
import Fragment from "Fragment" /* 21 */;
|
|
|
|
|
import intl2 from "intl" /* 1115 */;
|
|
|
|
|
import react from "react" /* 19 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import MessagePreviewStore from "MessagePreviewStore" /* 7808 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import Constants from "Constants" /* 1074 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let AnalyticsObjects;
|
|
|
|
|
let AnalyticsSections;
|
2026-09-18 19:45:33 +00:00
|
|
|
({ AnalyticsSections, AnalyticsObjects } = Constants);
|
2026-10-01 14:13:23 +00:00
|
|
|
const jsx = Fragment.jsx;
|
2026-09-18 19:45:33 +00:00
|
|
|
const analyticsLocation = { section: AnalyticsSections.CHANNEL_SEARCH, object: AnalyticsObjects.CHANNEL_SEARCH };
|
|
|
|
|
const result = size.fileFinishedImporting("components_native/common/MessagePreview.tsx");
|
|
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
export default function MessagePreview(onBeforeJumpToMessage) {
|
|
|
|
|
onBeforeJumpToMessage = onBeforeJumpToMessage.onBeforeJumpToMessage;
|
|
|
|
|
const channelId = onBeforeJumpToMessage.channelId;
|
|
|
|
|
let obj = onBeforeJumpToMessage(504);
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [MessagePreviewStore];
|
2026-10-01 14:13:23 +00:00
|
|
|
const stateFromStoresObject = obj.useStateFromStoresObject(items, () => ({ messages: MessagePreviewStore.messages, jumpTargetId: MessagePreviewStore.jumpTargetId }));
|
2026-09-18 19:45:33 +00:00
|
|
|
const jumpTargetId = stateFromStoresObject.jumpTargetId;
|
|
|
|
|
const items1 = [jumpTargetId, onBeforeJumpToMessage];
|
2026-10-01 14:13:23 +00:00
|
|
|
const messages = stateFromStoresObject.messages;
|
|
|
|
|
const memo = react.useMemo(() => {
|
|
|
|
|
let intl;
|
|
|
|
|
const obj = { jumpToChatText: intl.string(intl2.t["+TSRGD"]), jumpTargetId, onBeforeJumpToMessage };
|
|
|
|
|
intl = intl2.intl;
|
2026-09-18 19:45:33 +00:00
|
|
|
return obj;
|
|
|
|
|
}, items1);
|
2026-10-01 14:13:23 +00:00
|
|
|
const effect = react.useEffect(() => () => {
|
|
|
|
|
const obj = jumpTargetId(closure_1_2[6]);
|
|
|
|
|
obj.clearMessages();
|
2026-09-18 19:45:33 +00:00
|
|
|
}, []);
|
2026-10-01 14:13:23 +00:00
|
|
|
return jsx(onBeforeJumpToMessage(12825).ChatPreview, { channelId, messages, jumpToChatProps: memo, analyticsLocation });
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|