Update EditChannels.plugin.js

This commit is contained in:
Mirco Wittrien 2021-06-15 19:08:38 +02:00
parent 580b92ef61
commit d2c545ba23
1 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
* @name EditChannels * @name EditChannels
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 4.3.0 * @version 4.3.1
* @description Allows you to locally edit Channels * @description Allows you to locally edit Channels
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -17,13 +17,14 @@ module.exports = (_ => {
"info": { "info": {
"name": "EditChannels", "name": "EditChannels",
"author": "DevilBro", "author": "DevilBro",
"version": "4.3.0", "version": "4.3.1",
"description": "Allows you to locally edit Channels" "description": "Allows you to locally edit Channels"
}, },
"changeLog": { "changeLog": {
"fixed": { "fixed": {
"Group DMs": "Fixed some stuff in Group DMs", "Group DMs": "Fixed some stuff in Group DMs",
"Show Hidden Channels": "Fixed some Issues with the fake category created by ShowHiddenChannels" "Show Hidden Channels": "Fixed some Issues with the fake category created by ShowHiddenChannels",
"Color Inherit": "Works again"
} }
} }
}; };
@ -633,8 +634,7 @@ module.exports = (_ => {
} }
getChannelDataColor (channelId) { getChannelDataColor (channelId) {
if (!changedChannels[channelId]) return null; if (changedChannels[channelId] && changedChannels[channelId].color) return changedChannels[channelId].color;
if (changedChannels[channelId].color) return changedChannels[channelId].color;
let channel = BDFDB.LibraryModules.ChannelStore.getChannel(channelId); let channel = BDFDB.LibraryModules.ChannelStore.getChannel(channelId);
let category = channel && channel.parent_id && BDFDB.LibraryModules.ChannelStore.getChannel(channel.parent_id); let category = channel && channel.parent_id && BDFDB.LibraryModules.ChannelStore.getChannel(channel.parent_id);
if (category && changedChannels[category.id] && changedChannels[category.id].inheritColor && changedChannels[category.id].color) return changedChannels[category.id].color; if (category && changedChannels[category.id] && changedChannels[category.id].inheritColor && changedChannels[category.id].color) return changedChannels[category.id].color;