use userGroups cached value to avoid re-render
This commit is contained in:
parent
9e55f24092
commit
229c4b98b4
3 changed files with 28 additions and 13 deletions
|
@ -65,6 +65,10 @@ class FlairStore extends EventEmitter {
|
|||
delete this._userGroups[userId];
|
||||
}
|
||||
|
||||
cachedPublicisedGroups(userId) {
|
||||
return this._userGroups[userId];
|
||||
}
|
||||
|
||||
getPublicisedGroupsCached(matrixClient, userId) {
|
||||
if (this._userGroups[userId]) {
|
||||
return Promise.resolve(this._userGroups[userId]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue