From 093be3d3cc9036a5e9a6579d10ff2ba7c7fc204c Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 20 Nov 2020 16:52:10 +0100 Subject: [PATCH] stuff --- Library/_res/BDFDB.data.json | 1 - .../ReadAllNotificationsButton.plugin.js | 12 +++++------- .../RemoveBlockedMessages.plugin.js | 10 +++++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Library/_res/BDFDB.data.json b/Library/_res/BDFDB.data.json index 91992edef4..074abc7862 100644 --- a/Library/_res/BDFDB.data.json +++ b/Library/_res/BDFDB.data.json @@ -199,7 +199,6 @@ "MemberCard": {"class": "guildsettingsmembercard"}, "MessageHeader": {"props": ["MessageTimestamp"]}, "Messages": {"strings": ["group-spacing-", "canManageMessages"]}, - "MessagesPopout": {"class": "messagespopout"}, "MessageUsername": {"strings": ["default.username", "colorString", "compact"]}, "ModalLayer": {"class": "layermodal"}, "MutualGuilds": {"class": "userprofilebody"}, diff --git a/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js b/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js index 06253e7ab2..dded464ffe 100644 --- a/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js +++ b/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js @@ -14,12 +14,12 @@ module.exports = (_ => { "info": { "name": "ReadAllNotificationsButton", "author": "DevilBro", - "version": "1.6.2", + "version": "1.6.3", "description": "Add a button to clear all notifications" }, "changeLog": { "fixed": { - "Works again": "Can discord stop messing with the server list, jeez" + "Clear Mentions": "Works again" } } }; @@ -70,7 +70,7 @@ module.exports = (_ => { this.patchedModules = { after: { Guilds: "render", - MessagesPopout: "render", + RecentMentions: "default", RecentsHeader: "default" } }; @@ -304,10 +304,8 @@ module.exports = (_ => { })); } - processMessagesPopout (e) { - if (e.instance.props.className == BDFDB.disCN.recentmentionspopout && e.returnvalue.props.children && e.returnvalue.props.children[0]) { - e.returnvalue.props.children[0].props.messages = e.instance.props.messages; - } + processRecentMentions (e) { + if (e.instance.props.header && e.instance.props.header.props) e.instance.props.header.props.messages = e.returnvalue.props.messages; } processRecentsHeader (e) { diff --git a/Plugins/RemoveBlockedMessages/RemoveBlockedMessages.plugin.js b/Plugins/RemoveBlockedMessages/RemoveBlockedMessages.plugin.js index b6264c80ec..d008eb4d86 100644 --- a/Plugins/RemoveBlockedMessages/RemoveBlockedMessages.plugin.js +++ b/Plugins/RemoveBlockedMessages/RemoveBlockedMessages.plugin.js @@ -70,7 +70,6 @@ module.exports = (_ => { this.patchedModules = { before: { - MessagesPopout: "render", ReactorsComponent: "render", ChannelMembers: "render", PrivateChannelRecipients: "default", @@ -81,6 +80,8 @@ module.exports = (_ => { UserSummaryItem: "render" }, after: { + ChannelPins: "default", + RecentMentions: "default", Messages: "type", MemberListItem: "render", VoiceUser: "render", @@ -211,8 +212,11 @@ module.exports = (_ => { } } - processMessagesPopout (e) { - if (settings.removeMessages && BDFDB.ArrayUtils.is(e.instance.props.messages)) e.instance.props.messages = e.instance.props.messages.filter(n => !n || !n.author || !n.author.id || !BDFDB.LibraryModules.FriendUtils.isBlocked(n.author.id)); + processChannelPins (e) { + if (settings.removeMessages && e.returnvalue.props && e.returnvalue.props.children && e.returnvalue.props.children.props && BDFDB.ArrayUtils.is(e.returnvalue.props.children.props.messages)) e.returnvalue.props.children.props.messages = e.returnvalue.props.children.props.messages.filter(n => !n || !n.author || !n.author.id || !BDFDB.LibraryModules.FriendUtils.isBlocked(n.author.id)); + } + processRecentMentions (e) { + if (settings.removeMessages && BDFDB.ArrayUtils.is(e.returnvalue.props.messages)) e.returnvalue.props.messages = e.returnvalue.props.messages.filter(n => !n || !n.author || !n.author.id || !BDFDB.LibraryModules.FriendUtils.isBlocked(n.author.id)); } processReactorsComponent (e) {