This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
// Metro module 15179 (f15180).
import GuildDirectoryStore from "../directory_channels/GuildDirectoryStore";
import ReadStateStore from "../../stores/ReadStateStore";
import { useStateFromStores } from "../../_bundle/Module589";
import SnowflakeUtils from "../../utils/SnowflakeUtils";
import { MAX_CATEGORY_SERVERS } from "../directory_channels/GuildDirectoryUtils";
export function useHubUnreadCount(a0) {
return useStateFromStores([GuildDirectoryStore, ReadStateStore], () => {
if (a0 == null) {
return 0;
}
const r11 = ReadStateStore.ackMessageId(a0.id);
let c27959_0 = r11;
if (r11 == null) {
return 0;
}
const r13 = Object;
let r16 = GuildDirectoryStore.getDirectoryEntries(a0.id);
if (r16 == null) {
r16 = {};
}
return Math.min(MAX_CATEGORY_SERVERS, r13.values(r16).filter((item) => new Date(item.createdAt).getTime() > SnowflakeUtils.extractTimestamp(c27959_0)).length);
}, [a0]);
}