Update EditUsers.plugin.js
This commit is contained in:
parent
8172ee3189
commit
39db9fda7c
|
@ -2,7 +2,7 @@
|
||||||
* @name EditUsers
|
* @name EditUsers
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 4.4.4
|
* @version 4.4.5
|
||||||
* @description Allows you to locally edit Users
|
* @description Allows you to locally edit Users
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -17,7 +17,7 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "EditUsers",
|
"name": "EditUsers",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "4.4.4",
|
"version": "4.4.5",
|
||||||
"description": "Allows you to locally edit Users"
|
"description": "Allows you to locally edit Users"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -547,13 +547,14 @@ module.exports = (_ => {
|
||||||
let data = changedUsers[e.instance.props.user.id];
|
let data = changedUsers[e.instance.props.user.id];
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
if (!e.returnvalue) {
|
if (!e.returnvalue) {
|
||||||
e.instance.props.nickname = this.getUserNick(e.instance.props.user.id, e.instance.props.nickname);
|
let nickname = this.getUserNick(e.instance.props.user.id, e.instance.props.nickname);
|
||||||
|
e.instance.props.nickname = nickname ? nickname : null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (data.color1 || data.color2 || data.tag) {
|
if (data.color1 || data.color2 || data.tag) {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadernickname]]});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadernickname]]});
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
this.changeUserColor(children[index], e.instance.props.user.id, {changeBackground: true});
|
this.changeUserColor(children[index], e.instance.props.user.id, {changeBackground: true, aaa:true});
|
||||||
if (!BDFDB.ArrayUtils.is(children[index].props.children)) children[index].props.children = [children[index].props.children].flat(10);
|
if (!BDFDB.ArrayUtils.is(children[index].props.children)) children[index].props.children = [children[index].props.children].flat(10);
|
||||||
this.injectBadge(children[index].props.children, e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
|
this.injectBadge(children[index].props.children, e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
|
||||||
tagClass: BDFDB.disCNS.userpopoutheaderbottag + BDFDB.disCN.bottagnametag,
|
tagClass: BDFDB.disCNS.userpopoutheaderbottag + BDFDB.disCN.bottagnametag,
|
||||||
|
|
Loading…
Reference in New Issue