decord/source/components_native/chat/contentHandlers.tsx

120 lines
4.3 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 10892
// Function ID: 84702
2026-07-20 16:05:17 +00:00
// Name: onLongPressLink
2026-07-24 07:16:23 +00:00
// Dependencies: [5, 9561, 9617, 8385, 3827, 9564, 8537, 5482, 4098, 10893, 1934, 21, 3803, 1212, 5490, 3830, 4470, 9421, 2]
2026-07-20 16:05:17 +00:00
2026-07-24 07:16:23 +00:00
// Module 10892 (onLongPressLink)
2026-07-23 10:11:24 +00:00
import importDefaultResult from "castNativeSyntheticEventData";
const require = arg1;
let obj = { onLongPressLink };
onLongPressLink = function onLongPressLink(nativeEvent) {
2026-07-20 16:05:17 +00:00
const url = nativeEvent.nativeEvent.url;
let tmp = null != url;
if (tmp) {
tmp = "" !== url;
}
if (tmp) {
const obj = { urlString: url };
2026-07-24 07:16:23 +00:00
importDefault(9561)(obj);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
};
2026-07-20 16:05:17 +00:00
// CreateGeneratorClosureLongIndex (0x67)
let closure_4 = importDefaultResult(onLongPressLink);
const fn = function() {
return callback2(...arguments);
};
obj.onTapAttachmentLink = fn;
// CreateGeneratorClosureLongIndex (0x67)
let closure_3 = importDefaultResult(fn);
obj.onLongPressAttachmentLink = function() {
return callback(...arguments);
};
obj.onTapMention = function onTapMention(nativeEvent) {
let channelId;
let guildId;
let parsedUserId;
let roleId;
let roleName;
let userId;
2026-07-24 07:16:23 +00:00
let obj = parsedUserId(9564);
2026-07-20 16:05:17 +00:00
const nativeSyntheticEventData = obj.getNativeSyntheticEventData(nativeEvent);
({ userId, channelId, roleName, parsedUserId } = nativeSyntheticEventData);
({ roleId, guildId } = nativeSyntheticEventData);
if (null != userId) {
obj = { userId, channelId };
2026-07-24 07:16:23 +00:00
const items = [importDefault(5482).USER_MENTION];
2026-07-20 16:05:17 +00:00
obj.sourceAnalyticsLocations = items;
2026-07-24 07:16:23 +00:00
importDefault(8537)(obj);
const tmp22 = importDefault(8537);
2026-07-20 16:05:17 +00:00
} else {
if (null != roleId) {
if (null != guildId) {
obj = { guildId, roleId, channelId };
2026-07-24 07:16:23 +00:00
importDefault(4098).openLazy(parsedUserId(1934)(10893, dependencyMap.paths), "RoleMembersActionSheet", obj);
2026-07-23 10:11:24 +00:00
const obj9 = importDefault(4098);
2026-07-20 16:05:17 +00:00
}
}
if ("@everyone" === roleName) {
if (null != guildId) {
const obj1 = { guildId };
2026-07-23 10:11:24 +00:00
const obj6 = importDefault(4098);
2026-07-24 07:16:23 +00:00
const tmp14 = parsedUserId(1934)(10893, dependencyMap.paths);
2026-07-23 10:11:24 +00:00
obj1.roleId = importDefault(21).castGuildIdAsEveryoneGuildRoleId(guildId);
2026-07-20 16:05:17 +00:00
obj1.channelId = channelId;
obj6.openLazy(tmp14, "RoleMembersActionSheet", obj1);
2026-07-23 10:11:24 +00:00
const obj8 = importDefault(21);
2026-07-20 16:05:17 +00:00
}
}
if (null == roleName) {
2026-07-23 10:11:24 +00:00
const DeveloperMode = parsedUserId(3803).DeveloperMode;
2026-07-20 16:05:17 +00:00
if (DeveloperMode.getSetting()) {
if (null != parsedUserId) {
const obj2 = {};
2026-07-23 10:11:24 +00:00
const intl = parsedUserId(1212).intl;
obj2.secondaryConfirmText = intl.string(parsedUserId(1212).t["/AXYnE"]);
2026-07-20 16:05:17 +00:00
obj2.onConfirmSecondary = function onConfirmSecondary() {
2026-07-23 10:11:24 +00:00
parsedUserId(outer1_2[14]).copy(parsedUserId);
const obj = parsedUserId(outer1_2[14]);
const result = parsedUserId(outer1_2[15]).presentCopiedToClipboard();
2026-07-20 16:05:17 +00:00
};
let obj4 = obj2;
}
2026-07-23 10:11:24 +00:00
let obj3 = importDefault(4470);
2026-07-20 16:05:17 +00:00
obj3 = {};
2026-07-23 10:11:24 +00:00
const intl2 = parsedUserId(1212).intl;
obj3.title = intl2.string(parsedUserId(1212).t.r0DLNm);
const intl3 = parsedUserId(1212).intl;
obj3.body = intl3.string(parsedUserId(1212).t.Fqqbhg);
const intl4 = parsedUserId(1212).intl;
obj3.confirmText = intl4.string(parsedUserId(1212).t.BddRzS);
2026-07-20 16:05:17 +00:00
const merged = Object.assign(obj4);
obj3.show(obj3);
}
obj4 = {};
}
}
};
obj.onTapTimestamp = function onTapTimestamp(nativeEvent) {
2026-07-23 10:11:24 +00:00
require(3830) /* presentAddedFriendToast */.presentTimestamp(nativeEvent.nativeEvent.node.full);
2026-07-20 16:05:17 +00:00
};
obj.onTapInlineCode = function onTapInlineCode(nativeEvent) {
const node = nativeEvent.nativeEvent.node;
let tmp = null != node.content;
if (tmp) {
tmp = "string" === typeof node.content;
}
if (tmp) {
2026-07-24 07:16:23 +00:00
require(5490) /* _copy */.copy(node.content);
const obj = require(5490) /* _copy */;
2026-07-23 10:11:24 +00:00
const result = require(3830) /* presentAddedFriendToast */.presentCopiedToClipboard();
const obj2 = require(3830) /* presentAddedFriendToast */;
2026-07-20 16:05:17 +00:00
}
};
obj.onTapEmoji = function onTapEmoji(emojiNode) {
2026-07-24 07:16:23 +00:00
importDefault(4098).openLazy(require(1934) /* maybeLoadBundle */(9421, dependencyMap.paths), "MessageEmojiActionSheet", { emojiNode: emojiNode.nativeEvent.node });
2026-07-20 16:05:17 +00:00
};
2026-07-23 10:11:24 +00:00
let result = require("isAttachmentUrl").fileFinishedImporting("components_native/chat/contentHandlers.tsx");
2026-07-20 16:05:17 +00:00
export const contentHandlers = obj;