Make the is-alone check use efficient methods

This commit is contained in:
David Baker 2018-08-22 17:05:36 +01:00
parent 852d6a3be5
commit a5f98b6a29

View file

@ -729,8 +729,8 @@ module.exports = React.createClass({
return; return;
} }
const joinedMembers = room.currentState.getMembers().filter((m) => m.membership === "join" || m.membership === "invite"); const joinedOrInvitedMemberCount = room.getJoinedMemberCount() + room.getInvitedMemberCount();
this.setState({isAlone: joinedMembers.length === 1}); this.setState({isAlone: joinedOrInvitedMemberCount === 1});
}, },
_updateConfCallNotification: function() { _updateConfCallNotification: function() {