Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Weblate 2018-08-23 08:33:23 +00:00
commit c6cb4f9b87

View file

@ -701,7 +701,6 @@ module.exports = React.createClass({
} }
this._updateRoomMembers(); this._updateRoomMembers();
this._checkIfAlone(this.state.room);
}, },
onRoomMemberMembership: function(ev, member, oldMembership) { onRoomMemberMembership: function(ev, member, oldMembership) {
@ -717,6 +716,7 @@ module.exports = React.createClass({
// refresh the conf call notification state // refresh the conf call notification state
this._updateConfCallNotification(); this._updateConfCallNotification();
this._updateDMState(); this._updateDMState();
this._checkIfAlone(this.state.room);
}, 500), }, 500),
_checkIfAlone: function(room) { _checkIfAlone: function(room) {
@ -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() {