diff --git a/Plugins/ShowBadgesInChat/ShowBadgesInChat.plugin.js b/Plugins/ShowBadgesInChat/ShowBadgesInChat.plugin.js index 049038eaea..ec43fc5c59 100644 --- a/Plugins/ShowBadgesInChat/ShowBadgesInChat.plugin.js +++ b/Plugins/ShowBadgesInChat/ShowBadgesInChat.plugin.js @@ -2,7 +2,7 @@ * @name ShowBadgesInChat * @author DevilBro * @authorId 278543574059057154 - * @version 1.9.4 + * @version 1.9.5 * @description Displays Badges (Nitro, Hypesquad, etc...) in the Chat/MemberList/DMList * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -75,11 +75,9 @@ module.exports = (_ => { specialFlag = BDFDB.NumberUtils.generateId() + "SPECIALFLAG"; this.modulePatches = { - before: [ - "MessageHeader" - ], after: [ "MemberListItem", + "MessageUsername", "PrivateChannel", "UserBadges" ] @@ -92,6 +90,9 @@ module.exports = (_ => { } this.css = ` + ${BDFDB.dotCN.messageheadertext} { + display: inline-flex !important; + } ${BDFDB.dotCN._showbadgesinchatbadges} { display: inline-flex !important; justify-content: center; @@ -125,10 +126,6 @@ module.exports = (_ => { position: static; margin: 0; } - ${BDFDB.dotCN._showbadgesinchatbadgeschat} { - position: relative; - top: 4px; - } ${BDFDB.dotCNS.messagerepliedmessage + BDFDB.dotCN._showbadgesinchatbadgeschat} { top: 0; } @@ -307,9 +304,9 @@ module.exports = (_ => { BDFDB.MessageUtils.rerenderAll(); } - processMessageHeader (e) { + processMessageUsername (e) { if (!e.instance.props.message) return; - let [children, index] = BDFDB.ReactUtils.findParent(e.instance.props.username, {filter: n => n && n.props && typeof n.props.renderPopout == "function"}); + let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {filter: n => n && n.props && typeof n.props.renderPopout == "function"}); if (index == -1) return; const author = e.instance.props.userOverride || e.instance.props.message.author; this.injectBadges(children, author, (BDFDB.LibraryStores.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id, "chat"); diff --git a/Plugins/SpotifyControls/SpotifyControls.plugin.js b/Plugins/SpotifyControls/SpotifyControls.plugin.js index 89320ed251..51c1b5bcd1 100644 --- a/Plugins/SpotifyControls/SpotifyControls.plugin.js +++ b/Plugins/SpotifyControls/SpotifyControls.plugin.js @@ -355,7 +355,7 @@ module.exports = (_ => { children: _this.defaults.buttons[this.props.type] && _this.defaults.buttons[this.props.type].icons ? (_this.defaults.buttons[this.props.type].icons[this.props.icon] || _this.defaults.buttons[this.props.type].icons[0]) : "?", onClick: this.props.disabled ? _ => {} : this.props.onClick, onContextMenu: this.props.disabled ? _ => {} : this.props.onContextMenu, - }), "active", "disabled", "renderPopout", "icon", "type")); + }), "active", "disabled", "renderPopout", "icon", "type", "player")); return !this.props.disabled && typeof this.props.renderPopout == "function" ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.PopoutContainer, { children: button, animation: BDFDB.LibraryComponents.PopoutContainer.Animation.SCALE,