Step 8.5: Isolate RightPanelStore from RoomViewStore

This commit is contained in:
Travis Ralston 2022-03-24 15:50:04 -06:00
parent 66401c844f
commit 4144d0ba57
7 changed files with 91 additions and 29 deletions

View file

@ -60,7 +60,13 @@ export abstract class ReadyWatchingStore extends EventEmitter implements IDestro
// Default implementation is to do nothing.
}
protected onDispatcherAction(payload: ActionPayload) {
// Default implementation is to do nothing.
}
private onAction = async (payload: ActionPayload) => {
this.onDispatcherAction(payload);
if (payload.action === 'MatrixActions.sync') {
// Only set the client on the transition into the PREPARED state.
// Everything after this is unnecessary (we only need to know once we have a client)