From 3c2320635a3db2d10d262940b46871db8e918d82 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 4 May 2020 15:47:40 +1000 Subject: [PATCH] Filter secondaries --- ts/components/session/LeftPaneContactSection.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ts/components/session/LeftPaneContactSection.tsx b/ts/components/session/LeftPaneContactSection.tsx index 02ab2384f..c78e067e7 100644 --- a/ts/components/session/LeftPaneContactSection.tsx +++ b/ts/components/session/LeftPaneContactSection.tsx @@ -321,9 +321,13 @@ export class LeftPaneContactSection extends React.Component { private renderList() { const { sentFriendsRequest } = this.props; - const visibleFriendRequests = sentFriendsRequest.filter(device => !device.isSecondary); + + const visibleFriendRequests = sentFriendsRequest.filter( + device => !device.isSecondary + ); + const friends = window.getFriendsFromContacts(this.props.friends); - const length = Number(sentFriendsRequest.length) + Number(friends.length); + const length = Number(visibleFriendRequests.length) + Number(friends.length); const combined = [...visibleFriendRequests, ...friends]; const list = (