Make GroupStore use MatrixClientPeg
To avoid weirdness with using a cached matrix client
This commit is contained in:
parent
1a3ad5a342
commit
7ec4010881
11 changed files with 30 additions and 49 deletions
|
@ -21,12 +21,12 @@ class GroupStoreCache {
|
|||
this.groupStore = null;
|
||||
}
|
||||
|
||||
getGroupStore(matrixClient, groupId) {
|
||||
getGroupStore(groupId) {
|
||||
if (!this.groupStore || this.groupStore.groupId !== groupId) {
|
||||
// This effectively throws away the reference to any previous GroupStore,
|
||||
// allowing it to be GCd once the components referencing it have stopped
|
||||
// referencing it.
|
||||
this.groupStore = new GroupStore(matrixClient, groupId);
|
||||
this.groupStore = new GroupStore(groupId);
|
||||
}
|
||||
this.groupStore._fetchSummary();
|
||||
return this.groupStore;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue