Adding <Suspense> wrappers to start rendering Gpxes before they have all been fetched and removed auto compaction and compact db at init time.
This commit is contained in:
1 parent
079a36c1de
commit
3e191dbf38
4 files changed
+44
-10
No files matched your search
+3
-3
@@ -21,7 +21,7 @@ declare global {
|
||||
export const initDb = async (params: any) => {
|
||||
if (globalThis.db === undefined) {
|
||||
globalThis.db = new PouchDB('dyomedea', {
|
||||
auto_compaction: true,
|
||||
auto_compaction: false,
|
||||
revs_limit: 10,
|
||||
});
|
||||
}
|
||||
@@ -47,7 +47,7 @@ export const initDb = async (params: any) => {
|
||||
db.put(previousDbDefinition);
|
||||
// TODO: support migrations
|
||||
}
|
||||
await await db.compact();
|
||||
//await await db.compact();
|
||||
await db.viewCleanup();
|
||||
|
||||
// WARNING: defs must use the canonical form and be identical to what will be returned by db.getIndexes
|
||||
@@ -55,7 +55,7 @@ export const initDb = async (params: any) => {
|
||||
{
|
||||
name: 'type',
|
||||
def: {
|
||||
fields: [{ type: 'asc' }],
|
||||
fields: [{ type: 'desc' }, { id: 'desc' }],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user