From aa1b446c07484ee3504c79d0e49657f00bdebf67 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Thu, 10 Oct 2024 08:14:52 -0400 Subject: [PATCH] ShowHiddenChannels: Fix re-organizing channels (#2942) --- src/plugins/showHiddenChannels/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 7f008c8c..c74020f1 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -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.", @@ -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); } }