decord/source/modules/messages/useLongestChannelMessageBeforeReply.tsx
github-actions 777dc50a28 chore: update source for alpha 346.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
2026-09-10 19:12:31 +00:00

47 lines
1.5 KiB
TypeScript

// Module ID: 12520
// Function ID: 12521
// Name: useLongestChannelMessageBeforeReply
// Dependencies: [4826, 504, 2]
// Exports: useLongestChannelMessageBeforeReply
// Module 12520 (useLongestChannelMessageBeforeReply)
import MessageStore from "MessageStore" /* 4826 */;
const require = globalThis.__r;
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/messages/useLongestChannelMessageBeforeReply.tsx");
export const useLongestChannelMessageBeforeReply = function useLongestChannelMessageBeforeReply(id, recipientId) {
_require = id;
dependencyMap = recipientId;
const items = [MessageStore];
const items1 = [id, recipientId];
return require("initialize").useStateFromStores(items, () => {
if (null != closure_1) {
const messages = MessageStore.getMessages(closure_0);
const findOldestResult = messages.findOldest((author) => author.author.id === recipientId);
let tmp4 = findOldestResult;
if (null != findOldestResult) {
const toArrayResult = messages.toArray();
for (const item10018 of toArrayResult) {
if (item10018.author.id !== closure_1) {
obj2.return();
break;
} else {
let length;
if (tmp4 != null) {
length = tmp4.content.length;
}
if (tmp8.content.length > length) {
tmp4 = item10018;
}
continue;
}
return tmp4;
}
}
}
}, items1);
};