mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
fix: regression on the database and bookmark block (#2737)
(cherry picked from commit bf6af934f6)
This commit is contained in:
@@ -19,7 +19,6 @@ import { createIndexedDBBackgroundProvider } from '@affine/workspace/providers';
|
||||
import { createEmptyBlockSuiteWorkspace } from '@affine/workspace/utils';
|
||||
import { nanoid } from '@blocksuite/store';
|
||||
|
||||
import { setEditorFlags } from '../../utils/editor-flag';
|
||||
import {
|
||||
BlockSuitePageList,
|
||||
PageDetailEditor,
|
||||
@@ -44,7 +43,6 @@ export const LocalAdapter: WorkspaceAdapter<WorkspaceFlavour.LOCAL> = {
|
||||
const page = blockSuiteWorkspace.createPage({
|
||||
id: DEFAULT_HELLO_WORLD_PAGE_ID,
|
||||
});
|
||||
setEditorFlags(blockSuiteWorkspace);
|
||||
if (config.enablePreloading) {
|
||||
initPageWithPreloading(page).catch(err => {
|
||||
logger.error('init page with preloading failed', err);
|
||||
|
||||
@@ -64,7 +64,6 @@ import {
|
||||
} from '../providers/modal-provider';
|
||||
import { pathGenerator, publicPathGenerator } from '../shared';
|
||||
import { toast } from '../utils';
|
||||
import { setEditorFlags } from '../utils/editor-flag';
|
||||
|
||||
const QuickSearchModal = lazy(() =>
|
||||
import('../components/pure/quick-search-modal').then(module => ({
|
||||
@@ -311,7 +310,6 @@ export const WorkspaceLayoutInner: FC<PropsWithChildren> = ({ children }) => {
|
||||
id: pageId,
|
||||
});
|
||||
assertEquals(page.id, pageId);
|
||||
setEditorFlags(currentWorkspace.blockSuiteWorkspace);
|
||||
if (config.enablePreloading) {
|
||||
initPageWithPreloading(page).catch(error => {
|
||||
console.error('import error:', error);
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import { type BlockSuiteFeatureFlags, config } from '@affine/env';
|
||||
|
||||
import type { BlockSuiteWorkspace } from '../shared';
|
||||
|
||||
export function setEditorFlags(blockSuiteWorkspace: BlockSuiteWorkspace) {
|
||||
Object.entries(config.editorFlags).forEach(([key, value]) => {
|
||||
blockSuiteWorkspace.awarenessStore.setFlag(
|
||||
key as keyof BlockSuiteFeatureFlags,
|
||||
value
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user