Update PinDMs.plugin.js

This commit is contained in:
Mirco Wittrien 2022-02-25 16:17:36 +01:00
parent c497cd4fc1
commit 67f9c1fba6
1 changed files with 2 additions and 3 deletions

View File

@ -697,9 +697,8 @@ module.exports = (_ => {
}
_processPrivateChannel (instance, returnvalue, category) {
const interactive = BDFDB.ReactUtils.findChild(returnvalue, {props: [["className", BDFDB.disCN.namecontainerinteractive]]});
if (!interactive) return;
interactive.props.children.splice(interactive.props.children.length == 1 ? 1 : -1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
let [children, index] = BDFDB.ReactUtils.findParent(returnvalue, {name: "CloseButton"});
if (index > -1) children.splice(index, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
text: BDFDB.LanguageUtils.LanguageStrings.UNPIN,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
className: BDFDB.disCN._pindmsunpinbutton,