Fix onRoomStateMember debouncing
Don't have debounced functions take arsg, because they won't be the same for each invocation.
This commit is contained in:
parent
4ecf5f6372
commit
31399254b6
2 changed files with 20 additions and 10 deletions
|
@ -482,9 +482,7 @@ module.exports = React.createClass({
|
|||
}
|
||||
},
|
||||
|
||||
// rate limited because a power level change will emit an event for every
|
||||
// member in the room.
|
||||
onRoomStateMember: new rate_limited_func(function(ev, state, member) {
|
||||
onRoomStateMember: function(ev, state, member) {
|
||||
// ignore if we don't have a room yet
|
||||
if (!this.state.room) {
|
||||
return;
|
||||
|
@ -495,6 +493,15 @@ module.exports = React.createClass({
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.props.ConferenceHandler &&
|
||||
member.userId === this.props.ConferenceHandler.getConferenceUserIdForRoom(member.roomId)) {
|
||||
this._updateConfCallNotification();
|
||||
}
|
||||
|
||||
this._updateRoomMembers();
|
||||
},
|
||||
|
||||
_updateRoomMembers: new rate_limited_func(function() {
|
||||
// a member state changed in this room, refresh the tab complete list
|
||||
this.tabComplete.loadEntries(this.state.room);
|
||||
this._updateAutoComplete();
|
||||
|
@ -508,11 +515,6 @@ module.exports = React.createClass({
|
|||
joining: false
|
||||
});
|
||||
}
|
||||
|
||||
if (this.props.ConferenceHandler &&
|
||||
member.userId === this.props.ConferenceHandler.getConferenceUserIdForRoom(member.roomId)) {
|
||||
this._updateConfCallNotification();
|
||||
}
|
||||
}, 500),
|
||||
|
||||
_hasUnsentMessages: function(room) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue