Skip to content

Commit

Permalink
ShowHiddenChannels: Fix re-organizing channels (Vendicated#2942)
Browse files Browse the repository at this point in the history
  • Loading branch information
sadan4 authored and Nuckyz committed Oct 10, 2024
1 parent 2dce060 commit aa1b446
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/showHiddenChannels/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export const settings = definePluginSettings({
}
});

function isUncategorized(objChannel: { channel: Channel; comparator: number; }) {
return objChannel.channel.id === "null" && objChannel.channel.name === "Uncategorized" && objChannel.comparator === -1;
}

export default definePlugin({
name: "ShowHiddenChannels",
description: "Show channels that you do not have access to view.",
Expand Down Expand Up @@ -503,7 +507,7 @@ export default definePlugin({
res[key] ??= [];

for (const objChannel of maybeObjChannels) {
if (objChannel.channel.id === null || !this.isHiddenChannel(objChannel.channel)) res[key].push(objChannel);
if (isUncategorized(objChannel) || objChannel.channel.id === null || !this.isHiddenChannel(objChannel.channel)) res[key].push(objChannel);
}
}

Expand Down

0 comments on commit aa1b446

Please sign in to comment.