given the != join check, isInvite will never be true

Also, put comments in right order
This commit is contained in:
Bruno Windels 2018-08-02 11:47:24 +02:00
parent b151956f7b
commit 802efc7694

View file

@ -775,15 +775,14 @@ module.exports = withMatrixClient(React.createClass({
const room = this.props.matrixClient.getRoom(roomId); const room = this.props.matrixClient.getRoom(roomId);
if (room) { if (room) {
const myMembership = room.getMyMembership(); const myMembership = room.getMyMembership();
// not a DM room if we have are not joined
if (myMembership !== 'join') continue; 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; const them = this.props.member;
// not a DM room if they are not joined
if (!them.membership || them.membership !== 'join') continue; if (!them.membership || them.membership !== 'join') continue;
const highlight = room.getUnreadNotificationCount('highlight') > 0 || isInvite; const highlight = room.getUnreadNotificationCount('highlight') > 0;
tiles.push( tiles.push(
<RoomTile key={room.roomId} room={room} <RoomTile key={room.roomId} room={room}
@ -792,7 +791,7 @@ module.exports = withMatrixClient(React.createClass({
selected={false} selected={false}
unread={Unread.doesRoomHaveUnreadMessages(room)} unread={Unread.doesRoomHaveUnreadMessages(room)}
highlight={highlight} highlight={highlight}
isInvite={isInvite} isInvite={false}
onClick={this.onRoomTileClick} onClick={this.onRoomTileClick}
/>, />,
); );