mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
rerender after members are loaded so pills and RR get rerendered
This commit is contained in:
parent
27c496aecb
commit
86cbe34181
1 changed files with 8 additions and 3 deletions
|
@ -585,18 +585,23 @@ module.exports = React.createClass({
|
|||
this._loadMembersIfJoined();
|
||||
},
|
||||
|
||||
_loadMembersIfJoined: function() {
|
||||
_loadMembersIfJoined: async function() {
|
||||
// lazy load members if enabled
|
||||
if (SettingsStore.isFeatureEnabled('feature_lazyloading')) {
|
||||
const cli = MatrixClientPeg.get();
|
||||
const room = cli.getRoom(this.state.roomId);
|
||||
if (room && room.getMyMembership() === 'join') {
|
||||
room.loadMembersIfNeeded().catch((err) => {
|
||||
try {
|
||||
await room.loadMembersIfNeeded();
|
||||
if (!this.unmounted) {
|
||||
this.forceUpdate();
|
||||
}
|
||||
} catch(err) {
|
||||
const errorMessage = `Fetching room members for ${room.roomId} failed.` +
|
||||
" Room members will appear incomplete.";
|
||||
console.error(errorMessage);
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue