Update BetterFriendList.plugin.js

This commit is contained in:
Mirco Wittrien 2022-12-11 12:57:32 +01:00
parent bf3ea93039
commit f4ccc88905
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @name BetterFriendList
* @author DevilBro
* @authorId 278543574059057154
* @version 1.4.9
* @version 1.5.0
* @description Adds extra Controls to the Friends Page, for example sort by Name/Status, Search and All/Request/Blocked Amount
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -238,7 +238,7 @@ module.exports = (_ => {
for (let type in BDFDB.DiscordConstants.RelationshipTypes) relationshipCount[type] = 0;
for (let id in relationships) if (!this.settings.general.addHiddenCategory || (hiddenFriends.indexOf(id) == -1 || relationships[id] != BDFDB.DiscordConstants.RelationshipTypes.FRIEND)) relationshipCount[relationships[id]]++;
for (let child of e.returnvalue.props.children) if (child && child.props.id != BDFDB.DiscordConstants.FriendsSections.ADD_FRIEND) {
let newChildren = [child.props.children].flat().filter(child => BDFDB.ObjectUtils.get(child, "type.displayName") != "NumberBadge");
let newChildren = [child.props.children].flat().filter(n => !n || !n.props || n.props.count == undefined);
switch (child.props.id) {
case BDFDB.DiscordConstants.FriendsSections.ALL:
newChildren.push(this.createBadge(relationshipCount[BDFDB.DiscordConstants.RelationshipTypes.FRIEND]));