This commit is contained in:
Mirco Wittrien 2020-09-23 09:01:08 +02:00
parent ec4651b3a6
commit cb1c92259c
2 changed files with 17 additions and 12 deletions

View File

@ -5,8 +5,13 @@ module.exports = (_ => {
"info": {
"name": "EditServers",
"author": "DevilBro",
"version": "2.2.3",
"version": "2.2.4",
"description": "Allows you to change the icon, name and color of servers."
},
"changeLog": {
"fixed": {
"Server Invites": "No longer breaks server invites of non-joined servers"
}
}
};
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
@ -193,7 +198,7 @@ module.exports = (_ => {
}
processGuild (e) {
if (BDFDB.GuildUtils.is(e.instance.props.guild) && settings.changeInGuildList) {
if (BDFDB.GuildUtils.is(e.instance.props.guild) && e.instance.props.guild.joinedAt && settings.changeInGuildList) {
e.instance.props.guild = this.getGuildData(e.instance.props.guild.id);
if (e.returnvalue) {
let data = changedGuilds[e.instance.props.guild.id];
@ -258,7 +263,7 @@ module.exports = (_ => {
}
processGuildIconWrapper (e) {
if (BDFDB.GuildUtils.is(e.instance.props.guild)) {
if (BDFDB.GuildUtils.is(e.instance.props.guild) && e.instance.props.guild.joinedAt) {
if (e.instance.props.className && e.instance.props.className.indexOf(BDFDB.disCN.guildfolderguildicon) > -1) e.instance.props.guild = this.getGuildData(e.instance.props.guild.id, settings.changeInGuildList);
else if (e.instance.props.className && e.instance.props.className.indexOf(BDFDB.disCN.listavatar) > -1) e.instance.props.guild = this.getGuildData(e.instance.props.guild.id, settings.changeInMutualGuilds);
else e.instance.props.guild = this.getGuildData(e.instance.props.guild.id);
@ -266,7 +271,7 @@ module.exports = (_ => {
}
processGuildIcon (e) {
if (BDFDB.GuildUtils.is(e.instance.props.guild) && e.instance.props.style && (!e.instance.props.style.backgroundImage || e.instance.props.style.backgroundImage == "none")) {
if (BDFDB.GuildUtils.is(e.instance.props.guild) && e.instance.props.guild.joinedAt && e.instance.props.style && (!e.instance.props.style.backgroundImage || e.instance.props.style.backgroundImage == "none")) {
let data = changedGuilds[e.instance.props.guild.id];
if (data) {
if (e.instance.props.className && e.instance.props.className.indexOf(BDFDB.disCN.guildfolderguildicon) > -1) this.changeGuildIcon(e, data, settings.changeInGuildList);
@ -330,7 +335,7 @@ module.exports = (_ => {
}
processInviteGuildName (e) {
if (e.instance.props.guild && settings.changeInGuildInvites) {
if (e.instance.props.guild && e.instance.props.guild.joinedAt && settings.changeInGuildInvites) {
e.instance.props.guild = this.getGuildData(e.instance.props.guild.id);
}
}

View File

@ -359,13 +359,13 @@ module.exports = (_ => {
this.defaults = {
settings: {
closeOtherFolders: {value:false, description:"Close other Folders when opening a Folder."},
closeTheFolder: {value:false, description:"Close the Folder when selecting a Server."},
closeAllFolders: {value:false, description:"Close All Folders when selecting a Server."},
forceOpenFolder: {value:false, description:"Force a Folder to open when switching to a Server of that Folder."},
showCountBadge: {value:true, description:"Display Badge for Amount of Servers in a Folder."},
extraColumn: {value:true, description:"Moves the Servers from opened Folders in an extra column."},
addSeparators: {value:true, description:"Adds separators between Servers of different Folders in extra column."}
closeOtherFolders: {value:false, description:"Close other folders when opening a folder"},
closeTheFolder: {value:false, description:"Close the folder when selecting a server"},
closeAllFolders: {value:false, description:"Close all folders when selecting a server"},
forceOpenFolder: {value:false, description:"Force a folder to open when switching to a server of that folder"},
showCountBadge: {value:true, description:"Display badge for amount of servers in a folder"},
extraColumn: {value:true, description:"Moves the servers from opened folders in an extra column"},
addSeparators: {value:true, description:"Adds separators between servers of different folders in extra column"}
}
};