Only create one group store listener in RoomList
Instead of creating several and destroying the reference to the one created before.
This commit is contained in:
parent
e3a07be127
commit
4d8394954c
2 changed files with 17 additions and 12 deletions
|
@ -183,10 +183,12 @@ class GroupStore extends EventEmitter {
|
|||
// Call to set initial state (before fetching starts)
|
||||
this.emit('update');
|
||||
|
||||
this._fetchResource(this.STATE_KEY.Summary, groupId);
|
||||
this._fetchResource(this.STATE_KEY.GroupRooms, groupId);
|
||||
this._fetchResource(this.STATE_KEY.GroupMembers, groupId);
|
||||
this._fetchResource(this.STATE_KEY.GroupInvitedMembers, groupId);
|
||||
if (groupId) {
|
||||
this._fetchResource(this.STATE_KEY.Summary, groupId);
|
||||
this._fetchResource(this.STATE_KEY.GroupRooms, groupId);
|
||||
this._fetchResource(this.STATE_KEY.GroupMembers, groupId);
|
||||
this._fetchResource(this.STATE_KEY.GroupInvitedMembers, groupId);
|
||||
}
|
||||
|
||||
// Similar to the Store of flux/utils, we return a "token" that
|
||||
// can be used to unregister the listener.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue