Move management of room lists to RoomListStore

this is part maintenance to make RoomList clearer and part
allowing room list state to be modified via a dispatch.
This commit is contained in:
lukebarnard 2018-01-25 22:16:03 +01:00
parent d0e3319bd9
commit 701abb6a21
4 changed files with 383 additions and 67 deletions

View file

@ -62,6 +62,10 @@ function createAccountDataAction(matrixClient, accountDataEvent) {
};
}
function createRoomTagsAction(matrixClient, roomTagsEvent, room) {
return { action: 'MatrixActions.Room.tags', room };
}
/**
* This object is responsible for dispatching actions when certain events are emitted by
* the given MatrixClient.
@ -78,6 +82,7 @@ export default {
start(matrixClient) {
this._addMatrixClientListener(matrixClient, 'sync', createSyncAction);
this._addMatrixClientListener(matrixClient, 'accountData', createAccountDataAction);
this._addMatrixClientListener(matrixClient, 'Room.tags', createRoomTagsAction);
},
/**