From 6d770cb4d126e13c63f8d994c0a0ae3826fbabaf Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 18 Jan 2021 21:00:47 -0700 Subject: [PATCH] Appease the linter 2 --- src/stores/ReadyWatchingStore.ts | 4 ++++ src/stores/room-list/RoomListStore.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/stores/ReadyWatchingStore.ts b/src/stores/ReadyWatchingStore.ts index 9a28fe75fa..4bb577c784 100644 --- a/src/stores/ReadyWatchingStore.ts +++ b/src/stores/ReadyWatchingStore.ts @@ -42,6 +42,10 @@ export abstract class ReadyWatchingStore extends EventEmitter implements IDestro return this.matrixClient; // for external readonly access } + public useUnitTestClient(cli: MatrixClient) { + this.matrixClient = cli; + } + public destroy() { this.dispatcher.unregister(this.dispatcherRef); } diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts index cc9e00d29b..febd9aad9b 100644 --- a/src/stores/room-list/RoomListStore.ts +++ b/src/stores/room-list/RoomListStore.ts @@ -114,7 +114,7 @@ export class RoomListStoreClass extends AsyncStoreWithClient { // Public for test usage. Do not call this. public async makeReady(forcedClient?: MatrixClient) { if (forcedClient) { - super.readyStore.matrixClient = forcedClient; + super.readyStore.useUnitTestClient(forcedClient); } this.checkLoggingEnabled();