mirror of https://github.com/vector-im/riot-web
Merge pull request #364 from matrix-org/dbkr/fix_vector_power_level_freeze
Fix bug where vector freezes on power level eventpull/21833/head
commit
4d1afd70da
|
@ -493,6 +493,17 @@ module.exports = React.createClass({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.props.ConferenceHandler &&
|
||||||
|
member.userId === this.props.ConferenceHandler.getConferenceUserIdForRoom(member.roomId)) {
|
||||||
|
this._updateConfCallNotification();
|
||||||
|
}
|
||||||
|
|
||||||
|
this._updateRoomMembers();
|
||||||
|
},
|
||||||
|
|
||||||
|
// rate limited because a power level change will emit an event for every
|
||||||
|
// member in the room.
|
||||||
|
_updateRoomMembers: new rate_limited_func(function() {
|
||||||
// a member state changed in this room, refresh the tab complete list
|
// a member state changed in this room, refresh the tab complete list
|
||||||
this.tabComplete.loadEntries(this.state.room);
|
this.tabComplete.loadEntries(this.state.room);
|
||||||
this._updateAutoComplete();
|
this._updateAutoComplete();
|
||||||
|
@ -506,12 +517,7 @@ module.exports = React.createClass({
|
||||||
joining: false
|
joining: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}, 500),
|
||||||
if (this.props.ConferenceHandler &&
|
|
||||||
member.userId === this.props.ConferenceHandler.getConferenceUserIdForRoom(member.roomId)) {
|
|
||||||
this._updateConfCallNotification();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_hasUnsentMessages: function(room) {
|
_hasUnsentMessages: function(room) {
|
||||||
return this._getUnsentMessages(room).length > 0;
|
return this._getUnsentMessages(room).length > 0;
|
||||||
|
|
|
@ -14,6 +14,14 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 'debounces' a function to only execute every n milliseconds.
|
||||||
|
* Useful when react-sdk gets many, many events but only wants
|
||||||
|
* to update the interface once for all of them.
|
||||||
|
*
|
||||||
|
* Note that the function must not take arguments, since the args
|
||||||
|
* could be different for each invocarion of the function.
|
||||||
|
*/
|
||||||
module.exports = function(f, minIntervalMs) {
|
module.exports = function(f, minIntervalMs) {
|
||||||
this.lastCall = 0;
|
this.lastCall = 0;
|
||||||
this.scheduledCall = undefined;
|
this.scheduledCall = undefined;
|
||||||
|
|
Loading…
Reference in New Issue