fix: sync bug

This commit is contained in:
alt0
2022-09-23 19:14:23 +08:00
parent 054664ef6f
commit 5ac0f91efc
6 changed files with 128 additions and 60 deletions
+3 -1
View File
@@ -80,7 +80,8 @@ const AffineBoard = ({
);
},
async onChangePage(app, shapes, bindings, assets) {
Promise.all(
await services.api.editorBlock.suspend(workspace, true);
await Promise.all(
Object.entries(shapes).map(async ([id, shape]) => {
if (shape === undefined) {
return services.api.editorBlock.delete({
@@ -120,6 +121,7 @@ const AffineBoard = ({
}
})
);
await services.api.editorBlock.suspend(workspace, false);
},
}}
/>