ShowHiddenChannels: Fix showing lock icon for special channels (#3460)

This commit is contained in:
Henry 2025-06-04 19:24:04 -05:00 committed by GitHub
parent db0bcf7da3
commit 503c90c201
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -498,6 +498,7 @@ export default definePlugin({
if (channel.channelId != null) channel = ChannelStore.getChannel(channel.channelId); if (channel.channelId != null) channel = ChannelStore.getChannel(channel.channelId);
if (channel == null || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return false; if (channel == null || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return false;
if (["browse", "customize", "guide"].includes(channel.id)) return false;
return !PermissionStore.can(PermissionsBits.VIEW_CHANNEL, channel) || checkConnect && !PermissionStore.can(PermissionsBits.CONNECT, channel); return !PermissionStore.can(PermissionsBits.VIEW_CHANNEL, channel) || checkConnect && !PermissionStore.can(PermissionsBits.CONNECT, channel);
} catch (e) { } catch (e) {

View file

@ -589,6 +589,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
name: "samsam", name: "samsam",
id: 836452332387565589n, id: 836452332387565589n,
}, },
Cootshk: {
name: "Cootshk",
id: 921605971577548820n
},
} satisfies Record<string, Dev>); } satisfies Record<string, Dev>);
// iife so #__PURE__ works correctly // iife so #__PURE__ works correctly