Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Make the is-alone check use efficient methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Aug 22, 2018
1 parent 852d6a3 commit a5f98b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/structures/RoomView.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,8 @@ module.exports = React.createClass({
return;
}

const joinedMembers = room.currentState.getMembers().filter((m) => m.membership === "join" || m.membership === "invite");
this.setState({isAlone: joinedMembers.length === 1});
const joinedOrInvitedMemberCount = room.getJoinedMemberCount() + room.getInvitedMemberCount();
this.setState({isAlone: joinedOrInvitedMemberCount === 1});
},

_updateConfCallNotification: function() {
Expand Down

0 comments on commit a5f98b6

Please sign in to comment.