2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 15613
|
|
|
|
|
// Function ID: 15614
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: useLatestChannelMessage
|
2026-10-12 16:32:48 +00:00
|
|
|
// Dependencies: [32, 19, 14011, 558, 576, 504, 15614, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 15613 (useLatestChannelMessage)
|
2026-10-01 14:13:23 +00:00
|
|
|
import react from "react" /* 19 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import MessagePreviewManagerDefault from "MessagePreviewManager" /* 15614 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import _slicedToArray_mod from "_slicedToArray" /* 32 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import MessagePreviewStore from "message_previews/MessagePreviewStore" /* 14011 */;
|
2026-10-02 13:37:24 +00:00
|
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-02 13:37:24 +00:00
|
|
|
const require = globalThis.__r;
|
2026-10-12 16:32:48 +00:00
|
|
|
let _require;
|
2026-10-02 13:37:24 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let _slicedToArray = _slicedToArray_mod;
|
|
|
|
|
const useEffect = react.useEffect;
|
2026-10-12 16:32:48 +00:00
|
|
|
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useLatestChannelMessage(guild_id, arg1) {
|
2026-10-02 13:37:24 +00:00
|
|
|
let closure_0;
|
|
|
|
|
let closure_3;
|
|
|
|
|
let first;
|
|
|
|
|
let id;
|
|
|
|
|
let tmp = _require;
|
|
|
|
|
let tmp2 = id;
|
|
|
|
|
let obj = require("react");
|
|
|
|
|
const cResult = obj.c(9);
|
|
|
|
|
_require = tmp4;
|
|
|
|
|
guild_id = guild_id.guild_id;
|
|
|
|
|
id = guild_id.id;
|
|
|
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
let items = [MessagePreviewStore];
|
|
|
|
|
cResult[0] = items;
|
|
|
|
|
first = items;
|
|
|
|
|
} else {
|
|
|
|
|
first = cResult[0];
|
|
|
|
|
}
|
|
|
|
|
if (cResult[1] === id) {
|
|
|
|
|
if (cResult[2] === (undefined !== arg1 && arg1)) {
|
|
|
|
|
let tmp7;
|
|
|
|
|
if (cResult[3] === guild_id) {
|
|
|
|
|
tmp7 = cResult[4];
|
|
|
|
|
}
|
|
|
|
|
const tmpResult = tmp(tmp2[5]);
|
|
|
|
|
const tmp11 = _slicedToArray(tmpResult.useStateFromStoresArray(first, tmp7), 2)[1];
|
|
|
|
|
_slicedToArray = tmp11;
|
|
|
|
|
if (cResult[5] === id) {
|
|
|
|
|
let tmp12;
|
|
|
|
|
let tmp13;
|
|
|
|
|
if (cResult[6] === tmp11) {
|
|
|
|
|
tmp12 = cResult[7];
|
|
|
|
|
tmp13 = cResult[8];
|
|
|
|
|
}
|
|
|
|
|
useEffect(tmp12, tmp13);
|
|
|
|
|
return tmp10;
|
|
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
class L {
|
|
|
|
|
constructor() {
|
|
|
|
|
let tmp2 = null == id;
|
|
|
|
|
const tmp = id;
|
|
|
|
|
if (!tmp2) {
|
|
|
|
|
tmp2 = closure_3;
|
|
|
|
|
}
|
|
|
|
|
if (!tmp2) {
|
|
|
|
|
const obj = MessagePreviewManagerDefault;
|
|
|
|
|
obj.addWant(tmp);
|
|
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
let items1 = [id, tmp11];
|
|
|
|
|
cResult[5] = id;
|
|
|
|
|
cResult[6] = tmp11;
|
2026-10-12 16:32:48 +00:00
|
|
|
cResult[7] = L;
|
2026-10-02 13:37:24 +00:00
|
|
|
cResult[8] = items1;
|
|
|
|
|
tmp13 = items1;
|
2026-10-12 16:32:48 +00:00
|
|
|
tmp12 = L;
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const fn = function c() {
|
|
|
|
|
let items1;
|
|
|
|
|
const tmp = closure_0;
|
|
|
|
|
if (tmp) {
|
|
|
|
|
const items = [null, true];
|
|
|
|
|
items1 = items;
|
|
|
|
|
} else {
|
|
|
|
|
items1 = [MessagePreviewStore.message(guild_id, id), MessagePreviewStore.isLatest(guild_id, id)];
|
|
|
|
|
}
|
|
|
|
|
return items1;
|
|
|
|
|
};
|
|
|
|
|
cResult[1] = id;
|
|
|
|
|
cResult[2] = undefined !== arg1 && arg1;
|
|
|
|
|
cResult[3] = guild_id;
|
|
|
|
|
cResult[4] = fn;
|
|
|
|
|
tmp7 = fn;
|
2026-10-12 16:32:48 +00:00
|
|
|
}) : (function useLatestChannelMessage(arg0) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let c1;
|
|
|
|
|
let closure_3;
|
|
|
|
|
let first;
|
|
|
|
|
let id;
|
|
|
|
|
let tmp3;
|
2026-09-18 19:45:33 +00:00
|
|
|
let flag = arg1;
|
|
|
|
|
if (arg1 === undefined) {
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
|
|
|
|
c1 = undefined;
|
|
|
|
|
id = undefined;
|
|
|
|
|
({ guild_id: c1, id } = arg0);
|
2026-10-02 13:37:24 +00:00
|
|
|
let obj = flag(id[5]);
|
2026-09-18 19:45:33 +00:00
|
|
|
let items = [MessagePreviewStore];
|
2026-10-01 14:13:23 +00:00
|
|
|
[first, tmp3] = obj.useStateFromStoresArray(items, () => {
|
|
|
|
|
let items1;
|
|
|
|
|
const tmp = flag;
|
|
|
|
|
if (tmp) {
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [null, true];
|
2026-10-01 14:13:23 +00:00
|
|
|
items1 = items;
|
2026-09-18 19:45:33 +00:00
|
|
|
} else {
|
|
|
|
|
items1 = [MessagePreviewStore.message(c1, id), MessagePreviewStore.isLatest(c1, id)];
|
|
|
|
|
}
|
|
|
|
|
return items1;
|
2026-10-01 14:13:23 +00:00
|
|
|
});
|
|
|
|
|
_slicedToArray = tmp3;
|
|
|
|
|
let items1 = [id, tmp3];
|
2026-09-18 19:45:33 +00:00
|
|
|
useEffect(() => {
|
|
|
|
|
let tmp2 = null == id;
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp = id;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (!tmp2) {
|
|
|
|
|
tmp2 = closure_3;
|
|
|
|
|
}
|
|
|
|
|
if (!tmp2) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = MessagePreviewManagerDefault;
|
|
|
|
|
obj.addWant(tmp);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
}, items1);
|
2026-10-01 14:13:23 +00:00
|
|
|
return first;
|
2026-10-02 13:37:24 +00:00
|
|
|
});
|
|
|
|
|
const result = size.fileFinishedImporting("modules/message_previews/useLatestChannelMessage.tsx");
|
|
|
|
|
|
|
|
|
|
export default tmp2;
|