Update StaffTag.plugin.js

This commit is contained in:
Mirco Wittrien 2022-11-22 02:50:40 +01:00
parent 8bf188760b
commit e9cc0859e5
1 changed files with 0 additions and 17 deletions

View File

@ -97,7 +97,6 @@ module.exports = (_ => {
"MemberListItem",
"NameTag",
"UsernameSection",
"UserPopoutInfo",
"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 = {}) {
if (!BDFDB.ArrayUtils.is(children) || !user) return;