Fix vector-im/vector-web#694 - Empty invitee list
The invitee list is lazy-loaded 50ms after the first render. We were relying on setState from the member lazy-load to also kick the invitee list. However, setState is synchronous and we were loading the invitee list afterwards, which meant that the SearchableEntityList wouldn't have any invitees until the next render().
This commit is contained in:
parent
38d5c7d5c5
commit
99da0ef656
1 changed files with 4 additions and 2 deletions
|
@ -69,11 +69,13 @@ module.exports = React.createClass({
|
|||
// Lazy-load in more than the first N members
|
||||
setTimeout(function() {
|
||||
if (!self.isMounted()) return;
|
||||
// lazy load to prevent it blocking the first render
|
||||
self._loadUserList();
|
||||
|
||||
self.setState({
|
||||
members: self.roomMembers()
|
||||
});
|
||||
// lazy load to prevent it blocking the first render
|
||||
self._loadUserList();
|
||||
|
||||
}, 50);
|
||||
|
||||
// Attach a SINGLE listener for global presence changes then locate the
|
||||
|
|
Loading…
Reference in a new issue