unbreak jest tests

This commit is contained in:
Kegan Dougal 2023-01-19 11:15:08 +00:00
parent 186938d32a
commit 7c2dd7224f
3 changed files with 22 additions and 61 deletions

View file

@ -119,12 +119,10 @@ export class SlidingSyncManager {
public slidingSync: SlidingSync;
private client: MatrixClient;
private listIdToIndex: Record<string, number>;
private configureDefer: IDeferred<void>;
public constructor() {
this.listIdToIndex = {};
this.configureDefer = defer<void>();
}
@ -134,7 +132,6 @@ export class SlidingSyncManager {
public configure(client: MatrixClient, proxyUrl: string): SlidingSync {
this.client = client;
this.listIdToIndex = {};
// by default use the encrypted subscription as that gets everything, which is a safer
// default than potentially missing member events.
this.slidingSync = new SlidingSync(
@ -179,15 +176,6 @@ export class SlidingSyncManager {
return this.slidingSync;
}
public listIdForIndex(index: number): string | null {
for (const listId in this.listIdToIndex) {
if (this.listIdToIndex[listId] === index) {
return listId;
}
}
return null;
}
/**
* Ensure that this list is registered.
* @param listKey The list key to register