Update RemoveBlockedUsers.plugin.js

This commit is contained in:
Mirco Wittrien 2022-10-14 16:35:54 +02:00
parent 437153f83c
commit 12299a4564
1 changed files with 4 additions and 9 deletions

View File

@ -127,7 +127,7 @@ module.exports = (_ => {
}});
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.RelationshipUtils, "addRelationship", {after: e => {
if (e.methodArguments[2] == BDFDB.DiscordConstants.RelationshipTypes.BLOCKED) this.forceUpdateAll();
if (e.methodArguments[2] == BDFDB.DiscordConstants.RelationshipTypes.BLOCKED) BDFDB.DiscordUtils.rerenderAll();
}});
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.RelationshipUtils, "removeRelationship", {after: e => this.forceUpdateAll()});
@ -195,11 +195,11 @@ module.exports = (_ => {
else e.callOriginalMethodAfterwards();
}});
this.forceUpdateAll();
BDFDB.DiscordUtils.rerenderAll();
}
onStop () {
this.forceUpdateAll();
BDFDB.DiscordUtils.rerenderAll();
}
getSettingsPanel (collapseStates = {}) {
@ -239,15 +239,10 @@ module.exports = (_ => {
onSettingsClosed () {
if (this.SettingsUpdated) {
delete this.SettingsUpdated;
this.forceUpdateAll();
BDFDB.DiscordUtils.rerenderAll();
}
}
forceUpdateAll () {
BDFDB.PatchUtils.forceAllUpdates(this);
BDFDB.MessageUtils.rerenderAll();
}
processMessages (e) {
if (!this.settings.places.messages) return;
if (BDFDB.ArrayUtils.is(e.instance.props.channelStream)) {