Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,757 @@
|
||||
/* Metro module 11537; source: modules/chat_input/native/useChatInputRefs.tsx; dependencies: [31, 6583, 4645, 7075, 7080, 1878, 7729, 661, 6625, 4503, 6518, 4015, 22, 11538, 11540, 11541, 7875, 7165, 4022, 1583, 1482, 477, 4023, 1848, 683, 11005, 7067, 11004, 11542, 7076, 11543, 4643, 11574, 6996, 2] */
|
||||
function _fun88360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6, offset: 0x01fe09d0, size: 295 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
|
||||
const env0_5 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const editMessageStore = importDefault(7075) /* metro dependency 7075: EditMessageStore */;
|
||||
const slowmodeStore = importDefault(7080) /* metro dependency 7080: SlowmodeStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).updateChatInputContainerHeight;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_11 = (require(6625) /* metro dependency 6625: ChannelAutocompleteConstants */).COMMAND_SENTINEL;
|
||||
const env0_12 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/useChatInputRefs.tsx');
|
||||
exports.default = useChatInputRefs;
|
||||
}
|
||||
|
||||
function useChatInputRefs({chatInputProps, chatInputTextFieldHeight, ref}) { // fn#88361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:380, offset: 0x01fe0af7, size: 520 bytes, params: 2, frame: 21
|
||||
const binding = env0_3;
|
||||
let useRef = binding.useRef;
|
||||
const env0_2 = Reflect.apply(useRef, binding, [null]);
|
||||
var env0_3 = binding.useRef(null);
|
||||
const env0_4 = binding.useRef(null);
|
||||
const env0_5 = binding.useRef(null);
|
||||
const env0_6 = binding.useRef(null);
|
||||
const env0_7 = binding.useRef(null);
|
||||
const env0_8 = binding.useRef(null);
|
||||
const env0_9 = binding.useRef(null);
|
||||
useRef = binding.useRef;
|
||||
const Map = global.Map;
|
||||
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
const map = new Map();
|
||||
const env0_10 = Reflect.apply(useRef, binding, [map instanceof Object ? map : value2]);
|
||||
let value = importDefault(6518) /* metro dependency 6518: useInitialValue */;
|
||||
value = value(_fun88362);
|
||||
const env0_12 = binding.useRef(chatInputProps);
|
||||
const env0_13 = binding.useRef(chatInputProps);
|
||||
binding.useEffect(_fun88363, [chatInputProps]);
|
||||
binding.useEffect(_fun88364, [chatInputProps.channel.id]);
|
||||
binding.useEffect(_fun88365, [value, chatInputProps.channel.id]);
|
||||
const env0_14 = binding.useRef((importDefault(6518) /* metro dependency 6518: useInitialValue */)(function() {
|
||||
var chatInputPropsBinding = chatInputProps;
|
||||
return {'editId': null, 'focused': false, 'selectionStart': 0, 'selectionEnd': 0, 'text': null,
|
||||
'textPrev': null,
|
||||
'textFieldContentSize': 0, text: chatInputPropsBinding.defaultValue,
|
||||
textPrev: chatInputPropsBinding.defaultValue, textFieldHeight: chatInputTextFieldHeight};
|
||||
}));
|
||||
const env0_15 = binding.useRef({'handledHereMention': false, 'sending': false});
|
||||
value = binding.useMemo(_fun88368, [value]);
|
||||
const chatInputRefObject = value.chatInputRefObject;
|
||||
const chatInputRefObjectCallback = value.chatInputRefObjectCallback;
|
||||
const env0_16 = binding.useRef(chatInputRefObject);
|
||||
binding.useImperativeHandle(ref, chatInputRefObjectCallback);
|
||||
return binding.useMemo(_fun88406, []);
|
||||
}
|
||||
|
||||
function _fun88362() { // fn#88362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:631, offset: 0x01fe0cff, size: 62 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(4015) /* metro dependency 4015: ChatInputUtils */;
|
||||
const createInputRefTracker = value.createInputRefTracker;
|
||||
const chatInputPropsBinding = chatInputProps;
|
||||
return Reflect.apply(createInputRefTracker, value, [chatInputPropsBinding.channel.id,
|
||||
chatInputPropsBinding.screenIndex]);
|
||||
}
|
||||
|
||||
function _fun88363() { // fn#88363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:737, offset: 0x01fe0d3d, size: 98 bytes, params: 1, frame: 11
|
||||
let current = env0_13.current;
|
||||
if (current.channel.id !== chatInputProps.channel.id) {
|
||||
current = env0_16.current;
|
||||
if (current != null) {
|
||||
current.flushPendingDraftSave();
|
||||
}
|
||||
}
|
||||
const binding = env0_12;
|
||||
const binding2 = env0_13;
|
||||
binding.current = binding2.current;
|
||||
binding2.current = chatInputProps;
|
||||
}
|
||||
|
||||
function _fun88364() { // fn#88364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:886, offset: 0x01fe0d9f, size: 24 bytes, params: 1, frame: 2
|
||||
env0_15.current.handledHereMention = false;
|
||||
}
|
||||
|
||||
function _fun88365() { // fn#88365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:954, offset: 0x01fe0db7, size: 53 bytes, params: 1, frame: 13
|
||||
const binding = env0_11;
|
||||
binding.handleRef(env0_16.current, chatInputProps.channel.id);
|
||||
return _fun88366;
|
||||
}
|
||||
|
||||
function _fun88368() { // fn#88368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1292, offset: 0x01fe0e4b, size: 503 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const env0_0 = (importDefault(22) /* metro dependency 22 */).throttle(_fun88369, 200);
|
||||
const env0_1 = (importDefault(22) /* metro dependency 22 */).throttle(_fun88370, 500);
|
||||
const env0_2 = (importDefault(22) /* metro dependency 22 */).debounce(_fun88371, 32);
|
||||
return {chatInputRefObject: {backspace: backspace_88372, blur: blur_88373,
|
||||
chatInputTrackerRegister: chatInputTrackerRegister, chatInputTrackerUnregister: chatInputTrackerUnregister,
|
||||
clearText: clearText_88376, closeCustomKeyboard: closeCustomKeyboard_88377,
|
||||
dismissKeyboard: dismissKeyboard_88378, flushPendingDraftSave: flushPendingDraftSave, focus: focus_88380,
|
||||
getApplicationCommandManager: getApplicationCommandManager, getText: getText_88382,
|
||||
handleCancelEditing: handleCancelEditing, handlePressKey: handlePressKey, handleSaveEditing: handleSaveEditing,
|
||||
handleSend: handleSend, handleSelectGIF: handleSelectGIF, handleSelectSticker: handleSelectSticker,
|
||||
hideSideActions: hideSideActions, handleTextChanged: handleTextChanged, insertText: insertText,
|
||||
isFocused: isFocused_88396, openCustomKeyboard: openCustomKeyboard_88397,
|
||||
openSystemKeyboard: openSystemKeyboard_88398, replaceRange: replaceRange_88399,
|
||||
setSelectedRange: setSelectedRange_88400, setText: setText_88401, showSideActions: showSideActions,
|
||||
updateNativeTextBlocksThrottled: updateNativeTextBlocksThrottled,
|
||||
updateChatInputContainerHeightDebounced: updateChatInputContainerHeightDebounced},
|
||||
chatInputRefObjectCallback: chatInputRefObjectCallback};
|
||||
}
|
||||
|
||||
function _fun88406() { // fn#88406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:7437, offset: 0x01fe21a7, size: 122 bytes, params: 1, frame: 3
|
||||
return {chatInput: env0_16, chatInputCharCounter: env0_6, chatInputCover: env0_7, chatInputActions: env0_2,
|
||||
chatInputRightActions: env0_3, chatInputAutocomplete: env0_5, chatInputAppCommandManager: env0_4,
|
||||
chatInputNative: env0_8, chatInputSendButton: env0_9, chatInputTextFlushedResponses: env0_10, props: env0_13,
|
||||
propsPrev: env0_12, state: env0_14};
|
||||
}
|
||||
|
||||
function _fun88366() { // fn#88366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:995, offset: 0x01fe0dec, size: 39 bytes, params: 1, frame: 13
|
||||
const binding = env1_11;
|
||||
binding.handleRef(null, chatInputProps.channel.id);
|
||||
}
|
||||
|
||||
function _fun88369(a0, a1) { // fn#88369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1322, offset: 0x01fe1042, size: 58 bytes, params: 3, frame: 16
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
value.updateTextBlocks(env1_8.current, a0, a1);
|
||||
}
|
||||
|
||||
function _fun88370(a0) { // fn#88370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1399, offset: 0x01fe107c, size: 384 bytes, params: 2, frame: 20
|
||||
var startsWith;
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var value3;
|
||||
var defaultImport2;
|
||||
var defaultImport3;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var defaultImport4;
|
||||
const current = env1_13.current;
|
||||
const channel = current.channel;
|
||||
if (current.pendingEdit == null) {
|
||||
if (a0.length > 0) {
|
||||
startsWith = a0.startsWith;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
if (Reflect.apply(startsWith, a0, [COMMAND_SENTINEL])) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
defaultImport2 = importDefault(11540) /* metro dependency 11540: TypingActionCreators */;
|
||||
defaultImport2.stopTyping(channel.id);
|
||||
} else {
|
||||
defaultImport = importDefault(11540) /* metro dependency 11540: TypingActionCreators */;
|
||||
defaultImport.startTyping(channel.id);
|
||||
}
|
||||
} else {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
defaultImport2 = importDefault(11540) /* metro dependency 11540: TypingActionCreators */;
|
||||
defaultImport2.stopTyping(channel.id);
|
||||
}
|
||||
if (current.threadCreationCallback == null) {
|
||||
if (!env1_15.current.handledHereMention) {
|
||||
value4 = environment.__proto__.__proto__;
|
||||
moduleValue = require(11541) /* metro dependency 11541: ChatInputContentCallbacks */;
|
||||
if (moduleValue.tryUpdateSubscriptionForHereMention(a0,
|
||||
(require(7875) /* metro dependency 7875: useMessageMaxLength */).getMaxMessageLength(),
|
||||
channel.guild_id,
|
||||
channel.id)) {
|
||||
env1_15.current.handledHereMention = true;
|
||||
}
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
defaultImport4 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
|
||||
defaultImport4.saveDraft(channel.id, a0, DraftType.ChannelMessage);
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
defaultImport3 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
|
||||
defaultImport3.saveDraft(channel.id, a0, DraftType.FirstThreadMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun88371(a0) { // fn#88371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1863, offset: 0x01fe11fc, size: 38 bytes, params: 2, frame: 13
|
||||
updateChatInputContainerHeight(env1_13.current.screenIndex, a0);
|
||||
}
|
||||
|
||||
function backspace_88372() { // fn#88372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1913, offset: 0x01fe1222, size: 50 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
value.backspace(env1_8.current);
|
||||
}
|
||||
|
||||
function blur_88373() { // fn#88373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:1954, offset: 0x01fe1254, size: 50 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
value.blur(env1_8.current);
|
||||
}
|
||||
|
||||
function chatInputTrackerRegister() { // fn#88374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2010, offset: 0x01fe1286, size: 21 bytes, params: 1, frame: 9
|
||||
env1_11.register();
|
||||
}
|
||||
|
||||
function chatInputTrackerUnregister() { // fn#88375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2056, offset: 0x01fe129b, size: 21 bytes, params: 1, frame: 9
|
||||
env1_11.unregister();
|
||||
}
|
||||
|
||||
function clearText_88376() { // fn#88376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2087, offset: 0x01fe12b0, size: 37 bytes, params: 1, frame: 11
|
||||
const current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.setText('');
|
||||
}
|
||||
}
|
||||
|
||||
function closeCustomKeyboard_88377() { // fn#88377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2154, offset: 0x01fe12d5, size: 229 bytes, params: 1, frame: 16
|
||||
var defaultImport;
|
||||
var closeCustomKeyboard;
|
||||
var value3;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
|
||||
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
|
||||
const SYSTEM = KeyboardTypes.SYSTEM;
|
||||
if (keyboardType !== SYSTEM) {
|
||||
(require(1482) /* metro dependency 1482: KeyboardUIStoreNative */).setKeyboardType({type: KeyboardTypes.SYSTEM});
|
||||
}
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (!platformUtilsModule.isAndroid()) {
|
||||
defaultImport = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
closeCustomKeyboard = defaultImport.closeCustomKeyboard;
|
||||
value3 = environment.__proto__;
|
||||
Reflect.apply(closeCustomKeyboard, defaultImport, [env1_8.current]);
|
||||
}
|
||||
(require(4023) /* metro dependency 4023: PortalKeyboardUIStoreNative */).closePortalKeyboardRequest();
|
||||
}
|
||||
|
||||
function dismissKeyboard_88378() { // fn#88378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2399, offset: 0x01fe13ba, size: 65 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
|
||||
value = environment.__proto__;
|
||||
const current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.closeCustomKeyboard();
|
||||
}
|
||||
}
|
||||
|
||||
function flushPendingDraftSave() { // fn#88379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2511, offset: 0x01fe13fb, size: 21 bytes, params: 1, frame: 9
|
||||
env0_1.flush();
|
||||
}
|
||||
|
||||
function focus_88380() { // fn#88380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2533, offset: 0x01fe1410, size: 50 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
value.focus(env1_8.current);
|
||||
}
|
||||
|
||||
function getApplicationCommandManager() { // fn#88381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2594, offset: 0x01fe1442, size: 35 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return env1_4.current?.getApplicationCommandManager();
|
||||
}
|
||||
|
||||
function getText_88382() { // fn#88382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2681, offset: 0x01fe1465, size: 19 bytes, params: 1, frame: 1
|
||||
return env1_14.current.text;
|
||||
}
|
||||
|
||||
function handleCancelEditing() { // fn#88383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:2720, offset: 0x01fe1478, size: 272 bytes, params: 1, frame: 22
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var CHAT_CONTEXT_BAR_ACTION_CANCELED;
|
||||
var object2;
|
||||
var currentUser;
|
||||
var endEditMessage;
|
||||
let value = environment.__proto__;
|
||||
const channel = env1_13.current.channel;
|
||||
env0_1.cancel();
|
||||
value = environment.__proto__.__proto__;
|
||||
const getEditingMessage = EditMessageStore.getEditingMessage;
|
||||
let id = channel.id;
|
||||
const value2 = Reflect.apply(getEditingMessage, EditMessageStore, [id]);
|
||||
if (value2 != null) {
|
||||
value3 = undefined;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
CHAT_CONTEXT_BAR_ACTION_CANCELED = AnalyticEvents.CHAT_CONTEXT_BAR_ACTION_CANCELED;
|
||||
object2 = {};
|
||||
id = value2.id;
|
||||
object2.message_id = id;
|
||||
id = channel.id;
|
||||
object2.channel_id = id;
|
||||
object2.guild_id = channel.guild_id;
|
||||
object2.context_action = 'edit';
|
||||
object2.reason = (require(11005) /* metro dependency 11005: LongPressMessageActionSheetUtils */).getContextBarCancelReason('edit',
|
||||
|
||||
'cancel');
|
||||
currentUser = UserStore.getCurrentUser();
|
||||
id = currentUser == null ? value3 : currentUser.id;
|
||||
object2.is_own_message = id === value2.author.id;
|
||||
Reflect.apply(track, defaultImport, [CHAT_CONTEXT_BAR_ACTION_CANCELED, object2]);
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
endEditMessage = value.endEditMessage;
|
||||
id = channel.id;
|
||||
Reflect.apply(endEditMessage, value, [id]);
|
||||
}
|
||||
}
|
||||
|
||||
function handlePressKey(a0) { // fn#88384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:3109, offset: 0x01fe1588, size: 279 bytes, params: 2, frame: 16
|
||||
var r5;
|
||||
let value = environment.__proto__;
|
||||
let current = env1_13.current;
|
||||
const pendingEdit = current.pendingEdit;
|
||||
const pendingReply = current.pendingReply;
|
||||
const channel = current.channel;
|
||||
const isChannelOnCooldown2 = SlowmodeStore.isChannelOnCooldown(channel);
|
||||
if (a0 === '\r') {
|
||||
current = env1_16.current;
|
||||
r5 = current?.getText() ?? '';
|
||||
if (r5.trim().length > 0) {
|
||||
if (pendingEdit != null) {
|
||||
current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.handleSaveEditing();
|
||||
}
|
||||
} else if (!isChannelOnCooldown2) {
|
||||
current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.handleSend();
|
||||
}
|
||||
}
|
||||
} else if (!isChannelOnCooldown2) {
|
||||
current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.handleSend();
|
||||
}
|
||||
}
|
||||
} else if (a0 === 'UIKeyInputEscape') {
|
||||
if (pendingEdit != null) {
|
||||
current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.handleCancelEditing();
|
||||
}
|
||||
} else if (pendingReply != null) {
|
||||
value = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
|
||||
value.deletePendingReply(channel.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleSaveEditing(a0) { // fn#88385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:3571, offset: 0x01fe169f, size: 90 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var value;
|
||||
var getText;
|
||||
var value2;
|
||||
const closure = handleSaveEditing_body;
|
||||
if (a0 == null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
getText = value.getText;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(getText, value, [env1_8.current, env1_10.current, closure]);
|
||||
} else {
|
||||
closure(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function handleSend() { // fn#88387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:4057, offset: 0x01fe1821, size: 335 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var r0;
|
||||
var sendCommand;
|
||||
var text;
|
||||
var value6;
|
||||
var defaultImport;
|
||||
var getText;
|
||||
var value7;
|
||||
var defaultImport2;
|
||||
let current = env1_15.current;
|
||||
if (!current.sending) {
|
||||
current = env1_15.current;
|
||||
current.sending = true;
|
||||
env0_0.cancel();
|
||||
current = env1_13.current;
|
||||
if (current.threadCreationCallback != null) {
|
||||
value7 = environment.__proto__.__proto__;
|
||||
defaultImport2 = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
getText = defaultImport2.getText;
|
||||
current = env1_8.current;
|
||||
Reflect.apply(getText, defaultImport2, [current, env1_10.current, _fun88388]);
|
||||
current = env1_15.current;
|
||||
current.sending = false;
|
||||
return undefined;
|
||||
}
|
||||
current = env1_16.current;
|
||||
var applicationCommandManager = current.getApplicationCommandManager();
|
||||
if (applicationCommandManager == null) {
|
||||
r0 = undefined;
|
||||
} else {
|
||||
sendCommand = applicationCommandManager.sendCommand;
|
||||
current = env1_14.current;
|
||||
text = current.text;
|
||||
current = env1_13.current;
|
||||
r0 = Reflect.apply(sendCommand, applicationCommandManager, [text, current.channel, _fun88389]);
|
||||
}
|
||||
if (!r0) {
|
||||
value6 = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
defaultImport.getText(env1_8.current, env1_10.current, _fun88390);
|
||||
}
|
||||
current = env1_15.current;
|
||||
current.sending = false;
|
||||
}
|
||||
}
|
||||
|
||||
function handleSelectGIF({url}) { // fn#88391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:5005, offset: 0x01fe1b59, size: 271 bytes, params: 2, frame: 26
|
||||
var defaultImport;
|
||||
var sendMessage;
|
||||
var id;
|
||||
var value4;
|
||||
var object2;
|
||||
var defaultImport3;
|
||||
var moduleValue;
|
||||
var deletePendingReply;
|
||||
const {channel, pendingReply, threadCreationCallback} = env1_13.current;
|
||||
if (!(SlowmodeStore.isChannelOnCooldown(channel) || url.length === 0)) {
|
||||
if (threadCreationCallback != null) {
|
||||
threadCreationCallback(url);
|
||||
} else {
|
||||
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
sendMessage = defaultImport.sendMessage;
|
||||
id = channel.id;
|
||||
value4 = (importDefault(7076) /* metro dependency 7076: MessageParser */).parse(channel, url);
|
||||
object2 = {};
|
||||
defaultImport3 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
copyDataProperties(object2, defaultImport3.getSendMessageOptionsForReply(pendingReply), undefined);
|
||||
object2['location'] = MessageSendLocation.GIF_REPLY;
|
||||
Reflect.apply(sendMessage, defaultImport, [id, value4, true, object2]);
|
||||
moduleValue = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
|
||||
deletePendingReply = moduleValue.deletePendingReply;
|
||||
id = channel.id;
|
||||
Reflect.apply(deletePendingReply, moduleValue, [id]);
|
||||
}
|
||||
env1_16.current.dismissKeyboard();
|
||||
}
|
||||
}
|
||||
|
||||
function handleSelectSticker(a0) { // fn#88392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:5347, offset: 0x01fe1c68, size: 524 bytes, params: 2, frame: 30
|
||||
var moduleValue;
|
||||
var text;
|
||||
var moduleValue2;
|
||||
var chatInputValidateContentLength;
|
||||
var object;
|
||||
var object4;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var sendStickers;
|
||||
var id;
|
||||
var object5;
|
||||
var defaultImport2;
|
||||
var moduleValue3;
|
||||
var deletePendingReply;
|
||||
var defaultImport3;
|
||||
var saveDraft;
|
||||
let current = env1_13.current;
|
||||
const channel = current.channel;
|
||||
const pendingReply = current.pendingReply;
|
||||
const threadCreationCallback = current.threadCreationCallback;
|
||||
if (!SlowmodeStore.isChannelOnCooldown(channel)) {
|
||||
if (a0 != null) {
|
||||
moduleValue = require(4643) /* metro dependency 4643: StickersUtils */;
|
||||
if (moduleValue.isStandardSticker(a0)) {
|
||||
if (StickersStore.getStickerPack(a0.pack_id) != null) {
|
||||
current = env1_14.current;
|
||||
text = current.text;
|
||||
moduleValue2 = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
|
||||
chatInputValidateContentLength = moduleValue2.chatInputValidateContentLength;
|
||||
object = {text: text};
|
||||
object4 = {};
|
||||
current = env1_13.current;
|
||||
copyDataProperties(object4, current, undefined);
|
||||
object4['chatInputRef'] = env1_16;
|
||||
object.params = object4;
|
||||
value3 = Reflect.apply(chatInputValidateContentLength, moduleValue2, [object]);
|
||||
if (value3 != null) {
|
||||
env0_1.cancel();
|
||||
if (threadCreationCallback != null) {
|
||||
threadCreationCallback(text, [a0.id]);
|
||||
} else {
|
||||
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
sendStickers = defaultImport.sendStickers;
|
||||
id = channel.id;
|
||||
object = [a0.id];
|
||||
object5 = {};
|
||||
defaultImport2 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
copyDataProperties(object5, defaultImport2.getSendMessageOptionsForReply(pendingReply),
|
||||
undefined);
|
||||
object5['location'] = MessageSendLocation.STICKER_REPLY;
|
||||
Reflect.apply(sendStickers, defaultImport, [id, object, value3, object5]);
|
||||
moduleValue3 = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
|
||||
deletePendingReply = moduleValue3.deletePendingReply;
|
||||
id = channel.id;
|
||||
Reflect.apply(deletePendingReply, moduleValue3, [id]);
|
||||
defaultImport3 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
|
||||
saveDraft = defaultImport3.saveDraft;
|
||||
id = channel.id;
|
||||
Reflect.apply(saveDraft, defaultImport3, [id, '', DraftType.ChannelMessage]);
|
||||
current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.clearText();
|
||||
}
|
||||
current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.showSideActions();
|
||||
}
|
||||
}
|
||||
current = env1_16.current;
|
||||
current.dismissKeyboard();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
current = env1_14.current;
|
||||
text = current.text;
|
||||
moduleValue2 = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
|
||||
chatInputValidateContentLength = moduleValue2.chatInputValidateContentLength;
|
||||
object = {text: text};
|
||||
object4 = {};
|
||||
current = env1_13.current;
|
||||
copyDataProperties(object4, current, undefined);
|
||||
object4['chatInputRef'] = env1_16;
|
||||
object.params = object4;
|
||||
value3 = Reflect.apply(chatInputValidateContentLength, moduleValue2, [object]);
|
||||
if (value3 != null) {
|
||||
env0_1.cancel();
|
||||
if (threadCreationCallback != null) {
|
||||
threadCreationCallback(text, [a0.id]);
|
||||
} else {
|
||||
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
sendStickers = defaultImport.sendStickers;
|
||||
id = channel.id;
|
||||
object = [a0.id];
|
||||
object5 = {};
|
||||
defaultImport2 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
copyDataProperties(object5, defaultImport2.getSendMessageOptionsForReply(pendingReply),
|
||||
undefined);
|
||||
object5['location'] = MessageSendLocation.STICKER_REPLY;
|
||||
Reflect.apply(sendStickers, defaultImport, [id, object, value3, object5]);
|
||||
moduleValue3 = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
|
||||
deletePendingReply = moduleValue3.deletePendingReply;
|
||||
id = channel.id;
|
||||
Reflect.apply(deletePendingReply, moduleValue3, [id]);
|
||||
defaultImport3 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
|
||||
saveDraft = defaultImport3.saveDraft;
|
||||
id = channel.id;
|
||||
Reflect.apply(saveDraft, defaultImport3, [id, '', DraftType.ChannelMessage]);
|
||||
current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.clearText();
|
||||
}
|
||||
current = env1_16.current;
|
||||
if (current != null) {
|
||||
current.showSideActions();
|
||||
}
|
||||
}
|
||||
current = env1_16.current;
|
||||
current.dismissKeyboard();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function hideSideActions() { // fn#88393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6010, offset: 0x01fe1e74, size: 87 bytes, params: 1, frame: 13
|
||||
let current = env1_2.current;
|
||||
if (current != null) {
|
||||
current.onDismissActions(env1_14.current.focused);
|
||||
}
|
||||
current = env1_3.current;
|
||||
if (current != null) {
|
||||
current.onDismissActions(env1_14.current.focused);
|
||||
}
|
||||
}
|
||||
|
||||
function insertText(a0, a1, a2) { // fn#88395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6181, offset: 0x01fe1ecb, size: 141 bytes, params: 4, frame: 16
|
||||
var r5;
|
||||
let value = a0;
|
||||
const r6 = a1 ?? env1_14.current.selectionStart;
|
||||
const current = env1_16.current;
|
||||
const replaceRange = current.replaceRange;
|
||||
const object2 = {location: r6};
|
||||
object2.length = env1_14.current.selectionEnd - r6;
|
||||
if (a2) {
|
||||
value += ' ';
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
object2.text = r5;
|
||||
const editId = env1_14.current.editId;
|
||||
value = undefined;
|
||||
object2.editId = editId ?? value;
|
||||
Reflect.apply(replaceRange, current, [object2]);
|
||||
return value;
|
||||
}
|
||||
|
||||
function isFocused_88396() { // fn#88396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6372, offset: 0x01fe1f58, size: 20 bytes, params: 1, frame: 1
|
||||
return env1_14.current.focused;
|
||||
}
|
||||
|
||||
function openCustomKeyboard_88397(a0) { // fn#88397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6413, offset: 0x01fe1f6c, size: 97 bytes, params: 2, frame: 14
|
||||
const {channel, secondaryTextFieldRef} = env1_13.current;
|
||||
(importDefault(11574) /* metro dependency 11574: openCustomKeyboardAndroid */)({channelId: channel.id,
|
||||
chatInputRef: env1_16, chatInputNativeRef: env1_8, keyboardParams: a0,
|
||||
secondaryTextFieldRef: secondaryTextFieldRef});
|
||||
}
|
||||
|
||||
function openSystemKeyboard_88398() { // fn#88398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6595, offset: 0x01fe1fcd, size: 221 bytes, params: 1, frame: 16
|
||||
var openSystemKeyboard;
|
||||
var value5;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
|
||||
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
|
||||
const SYSTEM = KeyboardTypes.SYSTEM;
|
||||
if (!(keyboardType === SYSTEM && (require(6996) /* metro dependency 6996: useKeyboardIsOpen */).getKeyboardIsOpen({includeCustomKeyboard: false}))) {
|
||||
(require(1482) /* metro dependency 1482: KeyboardUIStoreNative */).setKeyboardType({type: KeyboardTypes.SYSTEM,
|
||||
context: {keyboardWillOpen: true}});
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
openSystemKeyboard = value.openSystemKeyboard;
|
||||
value5 = environment.__proto__;
|
||||
Reflect.apply(openSystemKeyboard, value, [env1_8.current]);
|
||||
}
|
||||
}
|
||||
|
||||
function replaceRange_88399(a0) { // fn#88399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6864, offset: 0x01fe20aa, size: 54 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
value.replaceRange(env1_8.current, a0);
|
||||
}
|
||||
|
||||
function setSelectedRange_88400(a0, a1) { // fn#88400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6921, offset: 0x01fe20e0, size: 58 bytes, params: 3, frame: 16
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
value.setSelectedRange(env1_8.current, a0, a1);
|
||||
}
|
||||
|
||||
function setText_88401(a0) { // fn#88401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:6979, offset: 0x01fe211a, size: 54 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(11538) /* metro dependency 11538: ChatInputNativeCommands */;
|
||||
value.setText(env1_8.current, a0);
|
||||
}
|
||||
|
||||
function showSideActions() { // fn#88402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:7030, offset: 0x01fe2150, size: 87 bytes, params: 1, frame: 13
|
||||
let current = env1_2.current;
|
||||
if (current != null) {
|
||||
current.onShowActions(env1_14.current.focused);
|
||||
}
|
||||
current = env1_3.current;
|
||||
if (current != null) {
|
||||
current.onShowActions(env1_14.current.focused);
|
||||
}
|
||||
}
|
||||
|
||||
function handleSaveEditing_body(a0) { // fn#88386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:3597, owner: handleSaveEditing.body, offset: 0x01fe16f9, size: 296 bytes, params: 2, frame: 21
|
||||
var r10;
|
||||
var value6;
|
||||
var moduleValue;
|
||||
var value7;
|
||||
var getEditingTextValue;
|
||||
var defaultImport;
|
||||
var endEditMessage;
|
||||
let value = a0;
|
||||
let current = env2_13.current;
|
||||
const channel = current.channel;
|
||||
env1_1.cancel();
|
||||
const getEditingMessage = EditMessageStore.getEditingMessage;
|
||||
let id = channel.id;
|
||||
const value5 = Reflect.apply(getEditingMessage, EditMessageStore, [id]);
|
||||
if (value5 != null) {
|
||||
value6 = undefined;
|
||||
moduleValue = require(11542) /* metro dependency 11542: LegacyCommands */;
|
||||
value7 = moduleValue.handleLegacyCommands(value, {channel: channel, isEdit: true});
|
||||
r10 = (value7 == null ? value6 : value7.content) == null ? value : value7.content;
|
||||
getEditingTextValue = EditMessageStore.getEditingTextValue;
|
||||
id = channel.id;
|
||||
if (r10 !== Reflect.apply(getEditingTextValue, EditMessageStore, [id])) {
|
||||
value = importDefault(7076) /* metro dependency 7076: MessageParser */;
|
||||
value = value.parse(channel, r10);
|
||||
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
defaultImport.editMessage(channel.id, value5.id, value);
|
||||
}
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
endEditMessage = value.endEditMessage;
|
||||
id = channel.id;
|
||||
Reflect.apply(endEditMessage, value, [id]);
|
||||
current = env2_16.current;
|
||||
if (current != null) {
|
||||
current.showSideActions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun88388(a0) { // fn#88388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:4218, offset: 0x01fe1970, size: 138 bytes, params: 2, frame: 19
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const chatInputSendUtilsModule = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
|
||||
const chatInputValidateContentLength = chatInputSendUtilsModule.chatInputValidateContentLength;
|
||||
const object3 = {text: a0};
|
||||
const object4 = {};
|
||||
const binding = env2_13;
|
||||
copyDataProperties(object4, binding.current, binding);
|
||||
object4['chatInputRef'] = env2_16;
|
||||
object3.params = object4;
|
||||
if (Reflect.apply(chatInputValidateContentLength, chatInputSendUtilsModule, [object3]) != null) {
|
||||
chatInputSendUtilsModule.chatInputCreateThread({text: a0, threadCreationCallback: threadCreationCallback});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun88389(a0, a1) { // fn#88389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:4519, offset: 0x01fe19fa, size: 102 bytes, params: 3, frame: 16
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
|
||||
const chatInputSendApplicationCommand = value.chatInputSendApplicationCommand;
|
||||
const object = {};
|
||||
const binding = env2_13;
|
||||
copyDataProperties(object, binding.current, binding);
|
||||
object['chatInputRef'] = env2_16;
|
||||
Reflect.apply(chatInputSendApplicationCommand, value, [{applicationCommand: {command: a0, optionValues: a1},
|
||||
params: object}]);
|
||||
}
|
||||
|
||||
function _fun88390(a0) { // fn#88390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11723:4697, offset: 0x01fe1a60, size: 249 bytes, params: 2, frame: 18
|
||||
var value2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var chatInputHandleSendText;
|
||||
var object;
|
||||
var value4;
|
||||
let current = env2_13.current;
|
||||
if (current.pendingEdit != null) {
|
||||
value4 = environment.__proto__;
|
||||
env1_1.cancel();
|
||||
current = env2_16.current;
|
||||
if (current != null) {
|
||||
current.handleSaveEditing(a0);
|
||||
}
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
env1_1.cancel();
|
||||
value3 = environment.__proto__.__proto__.__proto__;
|
||||
moduleValue = require(11543) /* metro dependency 11543: ChatInputSendUtils */;
|
||||
chatInputHandleSendText = moduleValue.chatInputHandleSendText;
|
||||
object = {};
|
||||
copyDataProperties(object, env2_13.current, undefined);
|
||||
object['chatInputRef'] = env2_16;
|
||||
Reflect.apply(chatInputHandleSendText, moduleValue, [{text: a0, params: object}]);
|
||||
}
|
||||
const keyboardType = (require(4022) /* metro dependency 4022: useKeyboardType */).getKeyboardType();
|
||||
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
|
||||
const SYSTEM = KeyboardTypes.SYSTEM;
|
||||
if (keyboardType === SYSTEM) {
|
||||
env2_16.current.focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user