mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
web: more fixes
This commit is contained in:
@@ -226,6 +226,10 @@ export class Notebooks implements ICollection {
|
||||
return notebook;
|
||||
}
|
||||
|
||||
find(title: string) {
|
||||
return this.all.find((eb) => eb("notebooks.title", "==", title));
|
||||
}
|
||||
|
||||
exists(id: string) {
|
||||
return this.collection.exists(id);
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ type Batch<T> = {
|
||||
export class VirtualizedGrouping<T> {
|
||||
private cache: Map<number, Batch<T>> = new Map();
|
||||
private pending: Map<number, Promise<Batch<T>>> = new Map();
|
||||
public ids: number[];
|
||||
private loadBatchTimeout?: number;
|
||||
public ids: boolean[];
|
||||
|
||||
constructor(
|
||||
count: number,
|
||||
@@ -43,7 +42,7 @@ export class VirtualizedGrouping<T> {
|
||||
) => Map<number, { index: number; hidden?: boolean; group: GroupHeader }>,
|
||||
readonly groups?: () => Promise<{ index: number; group: GroupHeader }[]>
|
||||
) {
|
||||
this.ids = new Array(count).fill(0);
|
||||
this.ids = new Array(count).fill(false);
|
||||
}
|
||||
|
||||
key(index: number) {
|
||||
@@ -95,14 +94,6 @@ export class VirtualizedGrouping<T> {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload the cache
|
||||
*/
|
||||
refresh(ids: number[]) {
|
||||
this.ids = ids;
|
||||
this.cache.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param index
|
||||
|
||||
Reference in New Issue
Block a user