decord/source/modules/messages/native/renderer/MessageWithContent.tsx

69 lines
3.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 8201
// Function ID: 8202
2026-07-20 16:05:17 +00:00
// Name: generateMessageRowData
2026-08-24 06:08:38 +00:00
// Dependencies: [8202, 8197, 8203, 1236, 8361, 2]
2026-07-20 16:05:17 +00:00
// Exports: generateMessageRowData
2026-08-24 06:08:38 +00:00
// Module 8201 (generateMessageRowData)
import getSystemLocale from "getSystemLocale" /* 1236 */;
import createThreadEmbedDefault from "createThreadEmbed" /* 8203 */;
import closure_3 from "handleMessageSendFailedAutomod" /* 8202 */;
import { RowType } from "Changeset" /* 8197 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
const result = require("set").fileFinishedImporting("modules/messages/native/renderer/MessageWithContent.tsx");
2026-07-20 16:05:17 +00:00
export const generateMessageRowData = function generateMessageRowData(canShowImages, options, theme) {
({ message, isEditing, isSystemDM } = canShowImages);
let tmp = undefined !== isSystemDM;
({ changeType, roleStyle, isFirst, separatorBefore, canAddNewReactions, reactionsTheme } = canShowImages);
if (tmp) {
tmp = isSystemDM;
}
canShowImages = canShowImages.canShowImages;
({ renderContentOnly, alwaysShowAddReaction } = canShowImages);
let tmp3 = undefined !== alwaysShowAddReaction;
({ truncation, pushFeedbackType } = canShowImages);
if (tmp3) {
tmp3 = alwaysShowAddReaction;
}
let overrideBackgroundHighlight = canShowImages.overrideBackgroundHighlight;
2026-08-24 06:08:38 +00:00
obj = { type: RowType.MESSAGE, message: createThreadEmbedDefault(obj), canAddNewReactions, addNewReactionAccessibilityLabel: null, reactionsTheme: null, highlightLabel: null, renderContentOnly: null, separatorBefore: null, changeType: null, truncation: null, alwaysShowAddReaction: null, backgroundHighlight: null, swipeActions: null, replyAccessibilityLabel: null, forwardAccessibilityLabel: null, threadAccessibilityLabel: null, forcedTheme: null };
2026-07-20 16:05:17 +00:00
obj = { options, message, roleStyle, isFirst, isEditing, canShowImages: undefined === canShowImages || canShowImages, isSystemDM: tmp, isInlineReplyPreview: false, pushFeedbackType, renderContentOnly, showContentInventoryEntryFallbackEmbed: canShowImages.showContentInventoryEntryFallbackEmbed };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[3] = intl.string(getSystemLocale.t.lfIHs4);
2026-07-29 08:29:29 +00:00
obj[4] = reactionsTheme;
2026-08-24 06:08:38 +00:00
const intl2 = getSystemLocale.intl;
obj[5] = intl2.string(getSystemLocale.t["IOS/dU"]);
2026-07-29 08:29:29 +00:00
obj[6] = renderContentOnly;
obj[7] = separatorBefore;
obj[8] = changeType;
obj[9] = truncation;
obj[10] = tmp3;
if (overrideBackgroundHighlight == null) {
2026-08-24 06:08:38 +00:00
let tmp4Result = tmp4(8361);
2026-07-29 08:29:29 +00:00
obj = { message: null, theme: null, isEditing: null, isAutomodBlockedMessage: null };
obj[0] = message;
obj[1] = theme;
obj[2] = isEditing;
obj[3] = null != message.getMessage(message.id);
overrideBackgroundHighlight = tmp4Result.createBackgroundHighlight(obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[11] = overrideBackgroundHighlight;
2026-08-24 06:08:38 +00:00
tmp4Result = tmp4(8361);
2026-07-20 16:05:17 +00:00
let canReply = options.enableSwipeActions;
if (canReply) {
canReply = canShowImages.canReply;
}
2026-07-29 08:29:29 +00:00
obj[12] = tmp4Result.createSwipeActions(canReply, options.enableSwipeActions && canShowImages.canEdit);
const intl3 = tmp6(1236).intl;
2026-08-24 06:08:38 +00:00
obj[13] = intl3.string(getSystemLocale.t["5IEsGx"]);
2026-07-29 08:29:29 +00:00
const intl4 = tmp6(1236).intl;
2026-08-24 06:08:38 +00:00
obj[14] = intl4.string(getSystemLocale.t.I3ltXO);
2026-07-29 08:29:29 +00:00
const intl5 = tmp6(1236).intl;
2026-08-24 06:08:38 +00:00
obj[15] = intl5.string(getSystemLocale.t.rBIGBL);
2026-07-22 07:54:56 +00:00
const forcedTheme = options.forcedTheme;
2026-07-29 08:29:29 +00:00
obj[16] = forcedTheme;
2026-07-20 16:05:17 +00:00
return obj;
};