Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
110 lines
3.4 KiB
TypeScript
110 lines
3.4 KiB
TypeScript
// Module ID: 17243
|
|
// Function ID: 17244
|
|
// Name: useOnMessageSend
|
|
// Dependencies: [19, 1078, 558, 568, 577, 2]
|
|
|
|
// Module 17243 (useOnMessageSend)
|
|
import DispatcherDefault from "Dispatcher" /* 577 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
const require = fn;
|
|
const MessageStates = fn(1078).MessageStates;
|
|
const ReactCompilerGating = fn(558);
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/messages/useOnMessageSend.tsx");
|
|
|
|
export default ReactCompilerGating.isReactCompilerEnabled() ? ((arg0, arg1) => {
|
|
_require = arg0;
|
|
const cResult = require("c").c(4);
|
|
let tmp2;
|
|
if (undefined !== arg1) {
|
|
tmp2 = arg1;
|
|
}
|
|
closure_1 = tmp2;
|
|
if (cResult[0] === arg0) {
|
|
if (cResult[1] === tmp2) {
|
|
let tmp3 = cResult[2];
|
|
let tmp4 = cResult[3];
|
|
}
|
|
const effect = noop.useEffect(tmp3, tmp4);
|
|
}
|
|
const fn = function c() {
|
|
function handleMessage(channelId) {
|
|
let tmp2 = undefined !== handleMessageCreate;
|
|
if (tmp2) {
|
|
tmp2 = channelId.channelId !== tmp;
|
|
}
|
|
if (!tmp2) {
|
|
handleMessage();
|
|
}
|
|
}
|
|
function handleMessageCreate(optimistic) {
|
|
optimistic = optimistic.optimistic;
|
|
if (!optimistic) {
|
|
optimistic = optimistic.message.state === constants.SENDING;
|
|
}
|
|
if (optimistic) {
|
|
if (!tmp3) {
|
|
handleMessage();
|
|
}
|
|
tmp3 = undefined !== handleMessageCreate && optimistic.channelId !== tmp2;
|
|
}
|
|
}
|
|
const subscription = closure_1(577).subscribe("MESSAGE_CREATE", handleMessageCreate);
|
|
let obj = closure_1(577);
|
|
const subscription1 = closure_1(577).subscribe("UPLOAD_START", handleMessage);
|
|
let obj2 = closure_1(577);
|
|
const subscription2 = closure_1(577).subscribe("CALL_CREATE", handleMessage);
|
|
return () => {
|
|
DispatcherDefault.unsubscribe("MESSAGE_CREATE", handleMessageCreate);
|
|
DispatcherDefault.unsubscribe("UPLOAD_START", handleMessage);
|
|
DispatcherDefault.unsubscribe("CALL_CREATE", handleMessage);
|
|
};
|
|
};
|
|
const items = [arg0, tmp2];
|
|
cResult[0] = arg0;
|
|
cResult[1] = tmp2;
|
|
cResult[2] = fn;
|
|
cResult[3] = items;
|
|
tmp4 = items;
|
|
tmp3 = fn;
|
|
}) : ((arg0) => {
|
|
closure_0 = arg0;
|
|
closure_1 = tmp;
|
|
const items = [arg0, arg1];
|
|
const effect = noop.useEffect(() => {
|
|
function handleMessage(channelId) {
|
|
let tmp2 = undefined !== handleMessageCreate;
|
|
if (tmp2) {
|
|
tmp2 = channelId.channelId !== tmp;
|
|
}
|
|
if (!tmp2) {
|
|
handleMessage();
|
|
}
|
|
}
|
|
function handleMessageCreate(optimistic) {
|
|
optimistic = optimistic.optimistic;
|
|
if (!optimistic) {
|
|
optimistic = optimistic.message.state === constants.SENDING;
|
|
}
|
|
if (optimistic) {
|
|
if (!tmp3) {
|
|
handleMessage();
|
|
}
|
|
tmp3 = undefined !== handleMessageCreate && optimistic.channelId !== tmp2;
|
|
}
|
|
}
|
|
const subscription = closure_1(577).subscribe("MESSAGE_CREATE", handleMessageCreate);
|
|
let obj = closure_1(577);
|
|
const subscription1 = closure_1(577).subscribe("UPLOAD_START", handleMessage);
|
|
let obj2 = closure_1(577);
|
|
const subscription2 = closure_1(577).subscribe("CALL_CREATE", handleMessage);
|
|
return () => {
|
|
DispatcherDefault.unsubscribe("MESSAGE_CREATE", handleMessageCreate);
|
|
DispatcherDefault.unsubscribe("UPLOAD_START", handleMessage);
|
|
DispatcherDefault.unsubscribe("CALL_CREATE", handleMessage);
|
|
};
|
|
}, items);
|
|
});
|