decord/source/modules/message_request/native/MessageRequestPreview.tsx

142 lines
5.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16192
// Function ID: 16193
// Dependencies: [19, 17, 4033, 676, 21, 4668, 6819, 712, 11812, 589, 698, 1236, 8355, 4828, 1297, 2]
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
// Module 16192
import ThemesDefault from "Themes" /* 712 */;
import importAllResult from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import closure_5 from "markAllUserIdListsStale" /* 4033 */;
import ME from "ME" /* 676 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
import importDefaultResult from "createTextStyle" /* 6819 */;
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
({ Fonts, AnalyticEvents: closure_6, MessageFlags: error } = ME);
let obj = { systemContent: null, messageContent: null };
2026-07-20 16:05:17 +00:00
obj = { fontStyle: "italic" };
2026-08-24 06:08:38 +00:00
const merged = Object.assign(importDefaultResult(Fonts.PRIMARY_MEDIUM, ThemesDefault.colors.TEXT_DEFAULT, 12));
2026-07-29 08:29:29 +00:00
obj.lineHeight = 16;
obj[0] = obj;
createCacheKey = {};
2026-08-24 06:08:38 +00:00
const merged1 = Object.assign(importDefaultResult(Fonts.PRIMARY_MEDIUM, ThemesDefault.colors.TEXT_DEFAULT, 12));
2026-07-29 08:29:29 +00:00
createCacheKey.lineHeight = 16;
obj[1] = createCacheKey;
let closure_9 = createCacheKey.createStyles(obj);
2026-08-24 06:08:38 +00:00
const importDefaultResult1 = importDefaultResult;
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function MessageRequestPreview(channel) {
channel = channel.channel;
2026-07-29 08:29:29 +00:00
let message;
2026-07-20 16:05:17 +00:00
const tmp = callback();
2026-08-24 06:08:38 +00:00
let obj = channel(11812);
2026-07-20 16:05:17 +00:00
const messageRequestPreview = obj.useMessageRequestPreview(channel);
2026-07-29 08:29:29 +00:00
message = messageRequestPreview.message;
2026-07-20 16:05:17 +00:00
({ loaded, error } = messageRequestPreview);
2026-08-24 06:08:38 +00:00
const items = [closure_5];
2026-07-20 16:05:17 +00:00
const items1 = [message];
2026-07-29 08:29:29 +00:00
const stateFromStoresObject = channel(589).useStateFromStoresObject(items, () => {
2026-07-20 16:05:17 +00:00
let isBlockedForMessageResult = null != message;
if (isBlockedForMessageResult) {
2026-08-24 06:08:38 +00:00
isBlockedForMessageResult = closure_1_5.isBlockedForMessage(tmp);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = { isBlocked: isBlockedForMessageResult, isIgnored: null };
let isIgnoredForMessageResult = null != tmp;
2026-07-20 16:05:17 +00:00
if (isIgnoredForMessageResult) {
2026-08-24 06:08:38 +00:00
isIgnoredForMessageResult = closure_1_5.isIgnoredForMessage(tmp);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = isIgnoredForMessageResult;
2026-07-20 16:05:17 +00:00
return obj;
}, items1);
const items2 = [channel, message];
({ isBlocked, isIgnored } = stateFromStoresObject);
const effect = importAllResult.useEffect(() => {
if (null != message) {
2026-08-24 06:08:38 +00:00
let obj = message(closure_1_2[10]);
2026-07-29 08:29:29 +00:00
obj = { is_spam: null, channel_id: null, other_user_id: null };
({ isSpam: obj2[0], id: obj2[1] } = channel);
obj[2] = tmp.author.id;
2026-08-24 06:08:38 +00:00
obj.track(closure_1_6.MESSAGE_REQUEST_PREVIEW_VIEWED, obj);
2026-07-20 16:05:17 +00:00
}
}, items2);
if (error) {
2026-07-29 08:29:29 +00:00
const intl9 = tmp2(1236).intl;
let stringResult = intl9.string(tmp2(1236).t.BZHld2);
2026-07-20 16:05:17 +00:00
let flag = false;
} else {
stringResult = null;
2026-07-29 08:29:29 +00:00
flag = false;
2026-07-20 16:05:17 +00:00
if (loaded) {
if (null != message) {
if (isBlocked) {
2026-07-29 08:29:29 +00:00
const intl8 = tmp2(1236).intl;
stringResult = intl8.string(tmp2(1236).t["WPe+xL"]);
2026-07-20 16:05:17 +00:00
flag = false;
}
}
if (null != message) {
if (isIgnored) {
2026-07-29 08:29:29 +00:00
const intl7 = tmp2(1236).intl;
stringResult = intl7.string(tmp2(1236).t.uxrh1O);
2026-07-20 16:05:17 +00:00
flag = false;
}
}
let content;
2026-07-29 08:29:29 +00:00
if (message != null) {
2026-07-20 16:05:17 +00:00
content = message.content;
}
if (null != content) {
if ("" !== message.content) {
2026-08-24 06:08:38 +00:00
const content1 = message(8355)(message, { noStyleAndInteraction: true, allowGameMentions: true }).content;
2026-07-20 16:05:17 +00:00
const _Array = Array;
if (!Array.isArray(content1)) {
flag = true;
stringResult = content1;
}
2026-07-29 08:29:29 +00:00
const intl6 = tmp2(1236).intl;
stringResult = intl6.string(tmp2(1236).t["262oPB"]);
2026-07-20 16:05:17 +00:00
flag = false;
}
}
if (null != message) {
2026-07-29 08:29:29 +00:00
if (tmp2Result.getMessageStickers(message).length > 0) {
const intl5 = tmp2(1236).intl;
let stringResult1 = intl5.string(tmp2(1236).t["zuI+by"]);
2026-07-20 16:05:17 +00:00
} else if (null != message.interaction) {
2026-07-29 08:29:29 +00:00
const intl4 = tmp2(1236).intl;
stringResult1 = intl4.string(tmp2(1236).t["2v7kfl"]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (message.hasFlag(constants.IS_VOICE_MESSAGE)) {
const intl3 = tmp2(1236).intl;
stringResult1 = intl3.string(tmp2(1236).t["6bhHrc"]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl2 = tmp2(1236).intl;
const string = intl2.string;
const t = tmp2(1236).t;
if (hasFlagResult) {
stringResult1 = string(t.Xxm5i3);
} else {
stringResult1 = string(t.LoMGlg);
}
hasFlagResult = message.hasFlag(tmp15.IS_COMPONENTS_V2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp15 = constants;
2026-07-20 16:05:17 +00:00
}
stringResult = stringResult1;
flag = false;
2026-08-24 06:08:38 +00:00
tmp2Result = tmp2(4828);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp2(1236).intl;
stringResult = intl.string(tmp2(1236).t["0KfDxM"]);
2026-07-20 16:05:17 +00:00
flag = false;
}
}
}
2026-07-29 08:29:29 +00:00
obj = { style: channel.style, children: jsx(tmp2(1297).LegacyText, { style: tmp14, numberOfLines: 3, ellipsizeMode: "tail", children: stringResult }) };
return <View style={arg0.style}>{jsx(tmp2(1297).LegacyText, { style: tmp14, numberOfLines: 3, ellipsizeMode: "tail", children: stringResult })}</View>;
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/message_request/native/MessageRequestPreview.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;