Refactor GroupStores into one global GroupStore
Take a step closer to a flux-like architecture for group data, for the purposes of providing features that require it. Now the app has a single GroupStore that can be poked to fetch updates for a particular group.
This commit is contained in:
parent
fba8a7d7d6
commit
023daef4b7
13 changed files with 245 additions and 281 deletions
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||
import MatrixClientPeg from '../MatrixClientPeg';
|
||||
import {getAddressType} from '../UserAddress';
|
||||
import {inviteToRoom} from '../RoomInvite';
|
||||
import GroupStoreCache from '../stores/GroupStoreCache';
|
||||
import GroupStore from '../stores/GroupStore';
|
||||
import Promise from 'bluebird';
|
||||
|
||||
/**
|
||||
|
@ -118,9 +118,7 @@ export default class MultiInviter {
|
|||
|
||||
let doInvite;
|
||||
if (this.groupId !== null) {
|
||||
doInvite = GroupStoreCache
|
||||
.getGroupStore(this.groupId)
|
||||
.inviteUserToGroup(addr);
|
||||
doInvite = GroupStore.inviteUserToGroup(this.groupId, addr);
|
||||
} else {
|
||||
doInvite = inviteToRoom(this.roomId, addr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue