mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 10:52:40 +08:00
fix(core): disable sync doc/blob on start (#4897)
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
WorkspaceFlavour,
|
||||
} from '@affine/env/workspace';
|
||||
import { CRUD as CloudCRUD } from '@affine/workspace/affine/crud';
|
||||
import { startSync, stopSync } from '@affine/workspace/affine/sync';
|
||||
|
||||
import { UI as CloudUI } from './cloud/ui';
|
||||
import { LocalAdapter } from './local';
|
||||
@@ -41,8 +40,6 @@ export const WorkspaceAdapters = {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
'service:start': startSync,
|
||||
'service:stop': stopSync,
|
||||
} as Partial<AppEvents>,
|
||||
CRUD: CloudCRUD,
|
||||
UI: CloudUI,
|
||||
|
||||
@@ -82,10 +82,10 @@ export function loadPage(page: Page, priority = 0) {
|
||||
if (!page.loaded) {
|
||||
await awaitForIdle();
|
||||
await page.waitForLoaded();
|
||||
logger.debug('page loaded', page.id);
|
||||
// we do not know how long it takes to load a page here
|
||||
// so that we just use 300ms timeout as the default page processing time
|
||||
await awaitForTimeout(300);
|
||||
logger.debug('page loaded', page.id);
|
||||
await awaitForTimeout(1000);
|
||||
} else {
|
||||
// do nothing if it is already loaded
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user