From a50982f055ae44764d11c4136018ac8e599e3152 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 17 Dec 2019 11:15:02 +0100 Subject: [PATCH] stuff --- .../FriendNotifications.plugin.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index 355480d30c..f2f3cd3a9b 100644 --- a/Plugins/FriendNotifications/FriendNotifications.plugin.js +++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js @@ -3,7 +3,7 @@ class FriendNotifications { getName () {return "FriendNotifications";} - getVersion () {return "1.3.4";} + getVersion () {return "1.3.7";} getAuthor () {return "DevilBro";} @@ -11,13 +11,7 @@ class FriendNotifications { constructor () { this.changelog = { - "fixed":[["Non Friends","Fixed issue where you are unable to add non friends to the observer list"]] - }; - - this.patchedModules = { - after: { - "StandardSidebarView":"componentWillUnmount" - } + "fixed":[["Non Friends","Fixed issue where previously configured friends that are no longer in your friend list could not be configured via non-friend list"]] }; } @@ -186,6 +180,14 @@ class FriendNotifications { settingshtml += this.createHoverCard(user, friends[id], "friends"); } } + for (let id in friends) if (!friendIDs.includes(id)) { + let user = BDFDB.LibraryModules.UserStore.getUser(id); + if (user) { + nonfriends[id] = Object.assign({}, friends[id]); + delete friends[id]; + settingshtml += this.createHoverCard(user, friends[id] || (friends[id] = this.createDefaultConfig()), "friends"); + } + } settingshtml += ``; settingshtml += `
`; settingshtml += `
Non-Friend-List
`; @@ -458,7 +460,7 @@ class FriendNotifications { } } - processStandardSidebarView (instance, wrapper, returnvalue) { + onSettingsClosed () { if (this.SettingsUpdated) { delete this.SettingsUpdated; this.startInterval();