Update StaffTag.plugin.js
This commit is contained in:
parent
8bf188760b
commit
e9cc0859e5
|
@ -97,7 +97,6 @@ module.exports = (_ => {
|
||||||
"MemberListItem",
|
"MemberListItem",
|
||||||
"NameTag",
|
"NameTag",
|
||||||
"UsernameSection",
|
"UsernameSection",
|
||||||
"UserPopoutInfo",
|
|
||||||
"VoiceUser"
|
"VoiceUser"
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -333,22 +332,6 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processUserPopoutInfo (e) {
|
|
||||||
if (e.instance.props.user && this.settings.tagPlaces.userPopout) {
|
|
||||||
let userType = this.getUserType(e.instance.props.user, e.instance.props.channel && e.instance.props.channel.id);
|
|
||||||
if (userType) {
|
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadernickname]]});
|
|
||||||
if (index > -1) {
|
|
||||||
if (!BDFDB.ArrayUtils.is(children[index].props.children)) children[index].props.children = [children[index].props.children].flat(10);
|
|
||||||
this.injectStaffTag(children[index].props.children, e.instance.props.user, userType, 2, {
|
|
||||||
tagClass: BDFDB.disCNS.userpopoutheaderbottag + BDFDB.disCN.bottagnametag,
|
|
||||||
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
injectStaffTag (children, user, userType, insertIndex, config = {}) {
|
injectStaffTag (children, user, userType, insertIndex, config = {}) {
|
||||||
if (!BDFDB.ArrayUtils.is(children) || !user) return;
|
if (!BDFDB.ArrayUtils.is(children) || !user) return;
|
||||||
|
|
Loading…
Reference in New Issue