Merge remote-tracking branch 'origin/develop' into travis/echo/audit
commit
80d072171f
|
@ -48,7 +48,10 @@ export abstract class AsyncStoreWithClient<T extends Object> extends AsyncStore<
|
||||||
await this.onAction(payload);
|
await this.onAction(payload);
|
||||||
|
|
||||||
if (payload.action === 'MatrixActions.sync') {
|
if (payload.action === 'MatrixActions.sync') {
|
||||||
// Filter out anything that isn't the first PREPARED 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)
|
||||||
|
// and we intentionally don't set the client before this point to avoid stores
|
||||||
|
// updating for every event emitted during the cached sync.
|
||||||
if (!(payload.prevState === 'PREPARED' && payload.state !== 'PREPARED')) {
|
if (!(payload.prevState === 'PREPARED' && payload.state !== 'PREPARED')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ export class BreadcrumbsStore extends AsyncStoreWithClient<IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private get meetsRoomRequirement(): boolean {
|
private get meetsRoomRequirement(): boolean {
|
||||||
return this.matrixClient.getVisibleRooms().length >= 20;
|
return this.matrixClient && this.matrixClient.getVisibleRooms().length >= 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async onAction(payload: ActionPayload) {
|
protected async onAction(payload: ActionPayload) {
|
||||||
|
|
Loading…
Reference in New Issue