mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-24 07:51:34 +02:00
Merge pull request #1405 from matrix-org/dbkr/update_on_group_invite
Update when a group arrives
This commit is contained in:
commit
3f0ee4e6ad
@ -89,6 +89,7 @@ module.exports = React.createClass({
|
|||||||
cli.on("RoomMember.name", this.onRoomMemberName);
|
cli.on("RoomMember.name", this.onRoomMemberName);
|
||||||
cli.on("Event.decrypted", this.onEventDecrypted);
|
cli.on("Event.decrypted", this.onEventDecrypted);
|
||||||
cli.on("accountData", this.onAccountData);
|
cli.on("accountData", this.onAccountData);
|
||||||
|
cli.on("Group.myMembership", this._onGroupMyMembership);
|
||||||
|
|
||||||
this.refreshRoomList();
|
this.refreshRoomList();
|
||||||
|
|
||||||
@ -157,6 +158,7 @@ module.exports = React.createClass({
|
|||||||
MatrixClientPeg.get().removeListener("RoomMember.name", this.onRoomMemberName);
|
MatrixClientPeg.get().removeListener("RoomMember.name", this.onRoomMemberName);
|
||||||
MatrixClientPeg.get().removeListener("Event.decrypted", this.onEventDecrypted);
|
MatrixClientPeg.get().removeListener("Event.decrypted", this.onEventDecrypted);
|
||||||
MatrixClientPeg.get().removeListener("accountData", this.onAccountData);
|
MatrixClientPeg.get().removeListener("accountData", this.onAccountData);
|
||||||
|
MatrixClientPeg.get().removeListener("Group.myMembership", this._onGroupMyMembership);
|
||||||
}
|
}
|
||||||
// cancel any pending calls to the rate_limited_funcs
|
// cancel any pending calls to the rate_limited_funcs
|
||||||
this._delayedRefreshRoomList.cancelPendingCall();
|
this._delayedRefreshRoomList.cancelPendingCall();
|
||||||
@ -236,6 +238,10 @@ module.exports = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onGroupMyMembership: function(group) {
|
||||||
|
this.forceUpdate();
|
||||||
|
},
|
||||||
|
|
||||||
_delayedRefreshRoomList: new rate_limited_func(function() {
|
_delayedRefreshRoomList: new rate_limited_func(function() {
|
||||||
this.refreshRoomList();
|
this.refreshRoomList();
|
||||||
}, 500),
|
}, 500),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user