decord/source/modules/messages/native/MessageAccessibilityActions.tsx

118 lines
4.8 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8227
// Function ID: 8228
2026-07-29 08:29:29 +00:00
// Name: MessageAccessibilityAction
2026-08-25 06:04:03 +00:00
// Dependencies: [4070, 8228, 1236, 8231, 8236, 2]
2026-07-20 16:05:17 +00:00
// Exports: createMessageAccessibilityActions, getMessageAccessibilityActionFromLabel
2026-08-25 06:04:03 +00:00
// Module 8227 (MessageAccessibilityAction)
import set from "set" /* 2 */;
2026-08-24 06:08:38 +00:00
import getSystemLocale from "getSystemLocale" /* 1236 */;
2026-08-25 06:04:03 +00:00
import explicitContentFromProto from "explicitContentFromProto" /* 4070 */;
import _modDef8231 from "module_8231" /* 8231 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let obj = { VIEW_PROFILE: "view_profile", ADD_REACTION: "add_reaction", ADD_QUICK_REACTION: "add_quick_reaction", REPLY: "reply", MESSAGE_ACTIONS_MENU: "message_actions_menu", EDIT_GDM: "edit_gdm", OPEN_PINS: "open_pins", JUMP_TO_MESSAGE: "jump_to_message" };
2026-08-25 06:04:03 +00:00
let result = set.fileFinishedImporting("modules/messages/native/MessageAccessibilityActions.tsx");
2026-07-29 08:29:29 +00:00
export const MessageAccessibilityAction = obj;
export const getMessageAccessibilityActionFromLabel = function getMessageAccessibilityActionFromLabel(action) {
2026-08-24 06:08:38 +00:00
obj = {};
const intl = getSystemLocale.intl;
obj[intl.string(getSystemLocale.t.iXAna6)] = obj.VIEW_PROFILE;
const intl2 = getSystemLocale.intl;
obj[intl2.string(getSystemLocale.t.lfIHs4)] = obj.ADD_REACTION;
const intl3 = getSystemLocale.intl;
obj[intl3.string(getSystemLocale.t["5IEsGx"])] = obj.REPLY;
const intl4 = getSystemLocale.intl;
obj[intl4.string(getSystemLocale.t.ChPNkN)] = obj.MESSAGE_ACTIONS_MENU;
const intl5 = getSystemLocale.intl;
obj[intl5.string(getSystemLocale.t["5Q9+/L"])] = obj.EDIT_GDM;
const intl6 = getSystemLocale.intl;
obj[intl6.string(getSystemLocale.t["mp1N/2"])] = obj.OPEN_PINS;
const intl7 = getSystemLocale.intl;
obj[intl7.string(getSystemLocale.t["+TSRGD"])] = obj.JUMP_TO_MESSAGE;
const DoubleTapReactionEmoji = explicitContentFromProto.DoubleTapReactionEmoji;
2026-07-20 16:05:17 +00:00
const setting = DoubleTapReactionEmoji.getSetting();
let disableDoubleTap;
2026-07-29 08:29:29 +00:00
if (setting != null) {
2026-07-20 16:05:17 +00:00
disableDoubleTap = setting.disableDoubleTap;
}
2026-07-29 08:29:29 +00:00
let formatToPlainStringResult = null;
if (true !== disableDoubleTap) {
2026-07-20 16:05:17 +00:00
if (null != setting) {
2026-08-25 06:04:03 +00:00
const result = tmp(8228).disambiguatedEmojiFromSettingsValue(setting);
2026-07-20 16:05:17 +00:00
if (null != result) {
2026-07-29 08:29:29 +00:00
const intl9 = tmp(1236).intl;
obj = { emojiName: null };
obj[0] = result.name;
formatToPlainStringResult = intl9.formatToPlainString(tmp(1236).t.eQIttH, obj);
2026-07-20 16:05:17 +00:00
}
2026-08-25 06:04:03 +00:00
const tmpResult = tmp(8228);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const intl8 = tmp(1236).intl;
formatToPlainStringResult = intl8.formatToPlainString(tmp(1236).t.eQIttH, { emojiName: "heart" });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (null != formatToPlainStringResult) {
obj[formatToPlainStringResult] = obj.ADD_QUICK_REACTION;
2026-07-20 16:05:17 +00:00
}
return obj[action];
};
export const createMessageAccessibilityActions = function createMessageAccessibilityActions(message, channel) {
if (null == channel) {
return [];
} else {
2026-08-24 06:08:38 +00:00
obj = { label: null, name: null };
2026-08-25 06:04:03 +00:00
const intl6 = getSystemLocale.intl;
obj[0] = intl6.string(getSystemLocale.t.iXAna6);
2026-07-29 08:29:29 +00:00
obj[1] = obj.VIEW_PROFILE;
2026-07-20 16:05:17 +00:00
const items = [obj];
2026-08-25 06:04:03 +00:00
if (_modDef8231(channel)) {
2026-07-29 08:29:29 +00:00
obj = { label: null, name: null };
2026-08-25 06:04:03 +00:00
const intl = tmp10(1236).intl;
obj[0] = intl.string(tmp10(1236).t.lfIHs4);
obj[1] = tmp12.ADD_REACTION;
2026-07-20 16:05:17 +00:00
items.push(obj);
2026-08-25 06:04:03 +00:00
const DoubleTapReactionEmoji = tmp10(4070).DoubleTapReactionEmoji;
2026-07-29 08:29:29 +00:00
const setting = DoubleTapReactionEmoji.getSetting();
let disableDoubleTap;
if (setting != null) {
disableDoubleTap = setting.disableDoubleTap;
}
let formatToPlainStringResult = null;
if (true !== disableDoubleTap) {
if (null != setting) {
2026-08-25 06:04:03 +00:00
let tmp10Result = tmp10(8228);
const result = tmp10Result.disambiguatedEmojiFromSettingsValue(setting);
2026-07-29 08:29:29 +00:00
if (null != result) {
2026-08-25 06:04:03 +00:00
const intl3 = tmp10(1236).intl;
2026-07-29 08:29:29 +00:00
obj = { emojiName: null };
obj[0] = result.name;
2026-08-25 06:04:03 +00:00
formatToPlainStringResult = intl3.formatToPlainString(tmp10(1236).t.eQIttH, obj);
2026-07-29 08:29:29 +00:00
}
}
2026-08-25 06:04:03 +00:00
const intl2 = tmp10(1236).intl;
formatToPlainStringResult = intl2.formatToPlainString(tmp10(1236).t.eQIttH, { emojiName: "heart" });
2026-07-29 08:29:29 +00:00
}
if (null != formatToPlainStringResult) {
2026-08-24 06:08:38 +00:00
obj1 = { label: null, name: null };
2026-07-29 08:29:29 +00:00
obj1[0] = formatToPlainStringResult;
2026-08-25 06:04:03 +00:00
obj1[1] = tmp12.ADD_QUICK_REACTION;
2026-07-29 08:29:29 +00:00
items.push(obj1);
2026-07-20 16:05:17 +00:00
}
}
2026-08-25 06:04:03 +00:00
tmp10Result = tmp10(8236);
if (tmp10Result.canReplyToMessage(channel, message)) {
2026-07-29 08:29:29 +00:00
const obj2 = { label: null, name: null };
2026-08-25 06:04:03 +00:00
const intl4 = tmp10(1236).intl;
obj2[0] = intl4.string(tmp10(1236).t["5IEsGx"]);
obj2[1] = tmp12.REPLY;
2026-07-29 08:29:29 +00:00
items.push(obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj3 = { label: null, name: null };
2026-08-25 06:04:03 +00:00
const intl5 = tmp10(1236).intl;
obj3[0] = intl5.string(getSystemLocale.t.ChPNkN);
2026-07-29 08:29:29 +00:00
obj3[1] = obj.MESSAGE_ACTIONS_MENU;
items.push(obj3);
2026-07-20 16:05:17 +00:00
return items;
}
};