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

@@ -0,0 +1,27 @@
// Metro module 15057 (f15058).
import GuildChannelStore from "../../stores/GuildChannelStore";
import { Permissions } from "../../_bundle/Module505";
import { useStateFromStores } from "../../_bundle/Module589";
import { canEveryone } from "../../utils/PermissionUtils";
export function useFirstGloballyViewbleGuildChannelId(a0) {
return useStateFromStores([GuildChannelStore], () => {
if (a0 == null) {
return void 0;
}
const selectableChannels = GuildChannelStore.getSelectableChannels(a0);
for (const item of selectableChannels) {
const channel = item.channel;
if (!canEveryone(Permissions.VIEW_CHANNEL, channel)) {
continue;
}
return channel.id;
}
const r40 = selectableChannels == null;
let r41 = void 0;
if (!r40) {
const r42 = selectableChannels[0];
r41 = r42 == null ? void 0 : r42.channel.id;
}
return r41;
}, [a0]);
}