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

117 lines
4.7 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 7986
// Function ID: 7987
// Name: MessageAccessibilityActions
2026-10-12 16:32:48 +00:00
// Dependencies: [2041, 7987, 1126, 7990, 7994, 2]
// Exports: createMessageAccessibilityActions, getMessageAccessibilityActionFromLabel
2026-10-12 16:32:48 +00:00
// Module 7986 (MessageAccessibilityActions)
2026-10-07 22:43:51 +00:00
import intl10 from "intl" /* 1126 */;
2026-10-12 16:32:48 +00:00
import UserSettings from "UserSettings" /* 2041 */;
import DoubleTapToReactUtils from "DoubleTapToReactUtils" /* 7987 */;
import canAddNewReactionsDefault from "canAddNewReactions" /* 7990 */;
import canReplyToMessage from "canReplyToMessage" /* 7994 */;
import size from "module_2" /* 2 */;
const MessageAccessibilityAction = { 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" };
let result = size.fileFinishedImporting("modules/messages/native/MessageAccessibilityActions.tsx");
export { MessageAccessibilityAction };
export const getMessageAccessibilityActionFromLabel = function getMessageAccessibilityActionFromLabel(action) {
const obj = {};
2026-10-01 14:13:23 +00:00
const intl = intl10.intl;
obj[intl.string(intl10.t.iXAna6)] = obj.VIEW_PROFILE;
const intl2 = intl10.intl;
obj[intl2.string(intl10.t.lfIHs4)] = obj.ADD_REACTION;
const intl3 = intl10.intl;
obj[intl3.string(intl10.t["5IEsGx"])] = obj.REPLY;
const intl4 = intl10.intl;
obj[intl4.string(intl10.t.ChPNkN)] = obj.MESSAGE_ACTIONS_MENU;
const intl5 = intl10.intl;
obj[intl5.string(intl10.t["5Q9+/L"])] = obj.EDIT_GDM;
const intl6 = intl10.intl;
obj[intl6.string(intl10.t["mp1N/2"])] = obj.OPEN_PINS;
const intl7 = intl10.intl;
obj[intl7.string(intl10.t["+TSRGD"])] = obj.JUMP_TO_MESSAGE;
const DoubleTapReactionEmoji = UserSettings.DoubleTapReactionEmoji;
const setting = DoubleTapReactionEmoji.getSetting();
let disableDoubleTap;
2026-10-01 14:13:23 +00:00
const tmp3 = obj;
if (setting != null) {
disableDoubleTap = setting.disableDoubleTap;
}
let formatToPlainStringResult = null;
if (true !== disableDoubleTap) {
if (null != setting) {
2026-10-01 14:13:23 +00:00
const tmpResult = DoubleTapToReactUtils;
const result = tmpResult.disambiguatedEmojiFromSettingsValue(setting);
if (null != result) {
2026-10-07 22:43:51 +00:00
const intl9 = tmp(1126).intl;
const obj2 = { emojiName: result.name };
2026-10-07 22:43:51 +00:00
formatToPlainStringResult = intl9.formatToPlainString(tmp(1126).t.eQIttH, obj2);
}
}
2026-10-07 22:43:51 +00:00
const intl8 = tmp(1126).intl;
formatToPlainStringResult = intl8.formatToPlainString(tmp(1126).t.eQIttH, { emojiName: "heart" });
}
if (null != formatToPlainStringResult) {
2026-10-01 14:13:23 +00:00
obj[formatToPlainStringResult] = tmp3.ADD_QUICK_REACTION;
}
return obj[action];
};
export const createMessageAccessibilityActions = function createMessageAccessibilityActions(message, channel) {
2026-10-01 14:13:23 +00:00
let intl;
let intl4;
let intl5;
let intl6;
let obj;
if (null == channel) {
return [];
} else {
2026-10-01 14:13:23 +00:00
const obj2 = { label: intl6.string(intl10.t.iXAna6), name: obj.VIEW_PROFILE };
intl6 = intl10.intl;
const items = [obj2];
if (canAddNewReactionsDefault(channel)) {
2026-10-01 14:13:23 +00:00
obj = { label: intl.string(intl10.t.lfIHs4), name: obj.ADD_REACTION };
const push = items.push;
2026-10-07 22:43:51 +00:00
intl = tmp10(1126).intl;
2026-10-01 14:13:23 +00:00
push(obj);
2026-10-12 16:32:48 +00:00
const DoubleTapReactionEmoji = tmp10(2041).DoubleTapReactionEmoji;
const setting = DoubleTapReactionEmoji.getSetting();
let disableDoubleTap;
if (setting != null) {
disableDoubleTap = setting.disableDoubleTap;
}
let formatToPlainStringResult = null;
if (true !== disableDoubleTap) {
if (null != setting) {
2026-10-01 14:13:23 +00:00
const tmp10Result = DoubleTapToReactUtils;
const result = tmp10Result.disambiguatedEmojiFromSettingsValue(setting);
if (null != result) {
2026-10-07 22:43:51 +00:00
const intl3 = tmp10(1126).intl;
const obj3 = { emojiName: result.name };
2026-10-07 22:43:51 +00:00
formatToPlainStringResult = intl3.formatToPlainString(tmp10(1126).t.eQIttH, obj3);
}
}
2026-10-07 22:43:51 +00:00
const intl2 = tmp10(1126).intl;
formatToPlainStringResult = intl2.formatToPlainString(tmp10(1126).t.eQIttH, { emojiName: "heart" });
}
if (null != formatToPlainStringResult) {
2026-10-01 14:13:23 +00:00
const obj4 = { label: formatToPlainStringResult, name: obj.ADD_QUICK_REACTION };
items.push(obj4);
}
}
2026-10-01 14:13:23 +00:00
const tmp10Result2 = canReplyToMessage;
if (tmp10Result2.canReplyToMessage(channel, message)) {
2026-10-01 14:13:23 +00:00
const push2 = items.push;
const obj5 = { label: intl4.string(intl10.t["5IEsGx"]), name: obj.REPLY };
2026-10-07 22:43:51 +00:00
intl4 = tmp10(1126).intl;
2026-10-01 14:13:23 +00:00
push2(obj5);
}
2026-10-01 14:13:23 +00:00
const push3 = items.push;
const obj6 = { label: intl5.string(intl10.t.ChPNkN), name: obj.MESSAGE_ACTIONS_MENU };
2026-10-07 22:43:51 +00:00
intl5 = tmp10(1126).intl;
2026-10-01 14:13:23 +00:00
push3(obj6);
return items;
}
};