ShowHiddenChannels: Fix re-organizing channels (#2942)
This commit is contained in:
parent
2dce060cf9
commit
aa1b446c07
1 changed files with 5 additions and 1 deletions
|
@ -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({
|
export default definePlugin({
|
||||||
name: "ShowHiddenChannels",
|
name: "ShowHiddenChannels",
|
||||||
description: "Show channels that you do not have access to view.",
|
description: "Show channels that you do not have access to view.",
|
||||||
|
@ -503,7 +507,7 @@ export default definePlugin({
|
||||||
res[key] ??= [];
|
res[key] ??= [];
|
||||||
|
|
||||||
for (const objChannel of maybeObjChannels) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue