fix(core): stuck when quick switch doc mode (#7599)

This commit is contained in:
EYHN
2024-07-25 12:21:21 +00:00
parent 11a2dc7d7f
commit 549e7befed
3 changed files with 74 additions and 11 deletions

View File

@@ -181,8 +181,6 @@ const DetailPageImpl = memo(function DetailPageImpl() {
const pageService =
editorHost?.std.spec.getService<PageRootService>('affine:page');
const disposable = new DisposableGroup();
doc.setMode(mode);
if (pageService) {
disposable.add(
pageService.slots.docLinkClicked.on(({ docId, blockId }) => {
@@ -204,15 +202,7 @@ const DetailPageImpl = memo(function DetailPageImpl() {
disposable.dispose();
};
},
[
doc,
mode,
jumpToPageBlock,
docCollection.id,
openPage,
jumpToTag,
workspace.id,
]
[jumpToPageBlock, docCollection.id, openPage, jumpToTag, workspace.id]
);
return (