prettier
This commit is contained in:
parent
c34df2bf96
commit
186938d32a
3 changed files with 11 additions and 7 deletions
|
@ -137,7 +137,13 @@ export class SlidingSyncManager {
|
||||||
this.listIdToIndex = {};
|
this.listIdToIndex = {};
|
||||||
// by default use the encrypted subscription as that gets everything, which is a safer
|
// by default use the encrypted subscription as that gets everything, which is a safer
|
||||||
// default than potentially missing member events.
|
// default than potentially missing member events.
|
||||||
this.slidingSync = new SlidingSync(proxyUrl, new Map(), ENCRYPTED_SUBSCRIPTION, client, SLIDING_SYNC_TIMEOUT_MS);
|
this.slidingSync = new SlidingSync(
|
||||||
|
proxyUrl,
|
||||||
|
new Map(),
|
||||||
|
ENCRYPTED_SUBSCRIPTION,
|
||||||
|
client,
|
||||||
|
SLIDING_SYNC_TIMEOUT_MS,
|
||||||
|
);
|
||||||
this.slidingSync.addCustomSubscription(UNENCRYPTED_SUBSCRIPTION_NAME, UNENCRYPTED_SUBSCRIPTION);
|
this.slidingSync.addCustomSubscription(UNENCRYPTED_SUBSCRIPTION_NAME, UNENCRYPTED_SUBSCRIPTION);
|
||||||
// set the space list
|
// set the space list
|
||||||
this.slidingSync.setList(SlidingSyncManager.ListSpaces, {
|
this.slidingSync.setList(SlidingSyncManager.ListSpaces, {
|
||||||
|
|
|
@ -56,7 +56,9 @@ export const useSlidingSyncRoomSearch = (): {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const rooms = [];
|
const rooms = [];
|
||||||
const { roomIndexToRoomId } = SlidingSyncManager.instance.slidingSync.getListData(SlidingSyncManager.ListSearch);
|
const { roomIndexToRoomId } = SlidingSyncManager.instance.slidingSync.getListData(
|
||||||
|
SlidingSyncManager.ListSearch,
|
||||||
|
);
|
||||||
let i = 0;
|
let i = 0;
|
||||||
while (roomIndexToRoomId[i]) {
|
while (roomIndexToRoomId[i]) {
|
||||||
const roomId = roomIndexToRoomId[i];
|
const roomId = roomIndexToRoomId[i];
|
||||||
|
|
|
@ -256,11 +256,7 @@ export class SlidingRoomListStoreClass extends AsyncStoreWithClient<IState> impl
|
||||||
this.tagMap = tagMap;
|
this.tagMap = tagMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private onSlidingSyncListUpdate(
|
private onSlidingSyncListUpdate(tagId: string, joinCount: number, roomIndexToRoomId: Record<number, string>): void {
|
||||||
tagId: string,
|
|
||||||
joinCount: number,
|
|
||||||
roomIndexToRoomId: Record<number, string>,
|
|
||||||
): void {
|
|
||||||
this.counts[tagId] = joinCount;
|
this.counts[tagId] = joinCount;
|
||||||
this.refreshOrderedLists(tagId, roomIndexToRoomId);
|
this.refreshOrderedLists(tagId, roomIndexToRoomId);
|
||||||
// let the UI update
|
// let the UI update
|
||||||
|
|
Loading…
Reference in a new issue