From 802efc76944192354cd58a9ff0c8191bd4c82db3 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 2 Aug 2018 11:47:24 +0200 Subject: [PATCH] given the != join check, isInvite will never be true Also, put comments in right order --- src/components/views/rooms/MemberInfo.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 794e1e5cfd..c635f09e2c 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -775,15 +775,14 @@ module.exports = withMatrixClient(React.createClass({ const room = this.props.matrixClient.getRoom(roomId); if (room) { const myMembership = room.getMyMembership(); + // not a DM room if we have are not joined if (myMembership !== 'join') continue; - const isInvite = myMembership === "invite"; - // not a DM room if we have are not joined - // not a DM room if they are not joined const them = this.props.member; + // not a DM room if they are not joined if (!them.membership || them.membership !== 'join') continue; - const highlight = room.getUnreadNotificationCount('highlight') > 0 || isInvite; + const highlight = room.getUnreadNotificationCount('highlight') > 0; tiles.push( , );