refactor: environment setup (#2898)

Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>
This commit is contained in:
Alex Yang
2023-06-28 19:19:19 +08:00
parent be33cfd174
commit bff8ca6178
72 changed files with 255 additions and 242 deletions

View File

@@ -1,5 +1,4 @@
import { DebugLogger } from '@affine/debug';
import { config } from '@affine/env';
import { WorkspaceFlavour, WorkspaceVersion } from '@affine/env/workspace';
import type { RootWorkspaceMetadataV2 } from '@affine/workspace/atom';
import { rootWorkspacesMetadataAtom } from '@affine/workspace/atom';
@@ -53,7 +52,7 @@ rootWorkspacesMetadataAtom.onMount = setAtom => {
}, 0);
}
if (environment.isDesktop && config.enableSQLiteProvider) {
if (environment.isDesktop && runtimeConfig.enableSQLiteProvider) {
window.apis?.workspace
.list()
.then(workspaceIDs => {