mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-11 07:33:05 -04:00
improve settings ui
This commit is contained in:
parent
8a7c0d7e61
commit
5c05443f45
11 changed files with 422 additions and 194 deletions
|
@ -477,12 +477,17 @@ export default definePlugin({
|
|||
],
|
||||
|
||||
isHiddenChannel(channel: Channel & { channelId?: string; }, checkConnect = false) {
|
||||
if (!channel) return false;
|
||||
try {
|
||||
if (!channel) return false;
|
||||
|
||||
if (channel.channelId) channel = ChannelStore.getChannel(channel.channelId);
|
||||
if (!channel || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return false;
|
||||
if (channel.channelId) channel = ChannelStore.getChannel(channel.channelId);
|
||||
if (!channel || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) 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) {
|
||||
console.error("[ViewHiddenChannels#isHiddenChannel]: ", e);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
resolveGuildChannels(channels: Record<string | number, Array<{ channel: Channel; comparator: number; }> | string | number>, shouldIncludeHidden: boolean) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue