decord/source/modules/messages/native/renderer/MessageWithContent.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

64 lines
3.3 KiB
TypeScript

// Module ID: 7989
// Function ID: 7990
// Name: MessageWithContent
// Dependencies: [7990, 7985, 7992, 1114, 8171, 2]
// Exports: generateMessageRowData
// Module 7989 (MessageWithContent)
import util from "util" /* 1114 */;
import createMessageContentDefault from "createMessageContent" /* 7992 */;
import RowGeneratorUtilsDefault from "RowGeneratorUtils" /* 8171 */;
import GuildAutomodMessageStore from "GuildAutomodMessageStore" /* 7990 */;
require = fn;
const RowType = fn(7985).RowType;
const size = fn(2);
const result = size.fileFinishedImporting("modules/messages/native/renderer/MessageWithContent.tsx");
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;
const obj = { type: RowType.MESSAGE, message: createMessageContentDefault({ options, message, roleStyle, isFirst, isEditing, canShowImages: undefined === canShowImages || canShowImages, isSystemDM: tmp, isInlineReplyPreview: false, pushFeedbackType, renderContentOnly, showContentInventoryEntryFallbackEmbed: canShowImages.showContentInventoryEntryFallbackEmbed }), 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 };
const intl = util.intl;
obj.addNewReactionAccessibilityLabel = intl.string(util.t.lfIHs4);
obj.reactionsTheme = reactionsTheme;
const intl2 = util.intl;
obj.highlightLabel = intl2.string(util.t["IOS/dU"]);
obj.renderContentOnly = renderContentOnly;
obj.separatorBefore = separatorBefore;
obj.changeType = changeType;
obj.truncation = truncation;
obj.alwaysShowAddReaction = tmp3;
if (overrideBackgroundHighlight == null) {
const obj3 = { message, theme, isEditing, isAutomodBlockedMessage: null != GuildAutomodMessageStore.getMessage(message.id) };
overrideBackgroundHighlight = tmp4(8171).createBackgroundHighlight(obj3);
const tmp4Result = tmp4(8171);
}
obj.backgroundHighlight = overrideBackgroundHighlight;
let canReply = options.enableSwipeActions;
if (canReply) {
canReply = canShowImages.canReply;
}
obj.swipeActions = RowGeneratorUtilsDefault.createSwipeActions(canReply, options.enableSwipeActions && canShowImages.canEdit);
const intl3 = tmp6(1114).intl;
obj.replyAccessibilityLabel = intl3.string(util.t["5IEsGx"]);
const intl4 = tmp6(1114).intl;
obj.forwardAccessibilityLabel = intl4.string(util.t.I3ltXO);
const intl5 = tmp6(1114).intl;
obj.threadAccessibilityLabel = intl5.string(util.t.rBIGBL);
const forcedTheme = options.forcedTheme;
obj.forcedTheme = forcedTheme;
return obj;
};