mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 04:51:49 +08:00
fix: if delete block, clear cache
This commit is contained in:
@@ -230,7 +230,12 @@ export class Editor implements Virgo {
|
|||||||
return await services.api.editorBlock.update(patches);
|
return await services.api.editorBlock.update(patches);
|
||||||
},
|
},
|
||||||
remove: async ({ workspace, id }: WorkspaceAndBlockId) => {
|
remove: async ({ workspace, id }: WorkspaceAndBlockId) => {
|
||||||
return await services.api.editorBlock.delete({ workspace, id });
|
const ret = await services.api.editorBlock.delete({
|
||||||
|
workspace,
|
||||||
|
id,
|
||||||
|
});
|
||||||
|
this._cacheManager.delete(id);
|
||||||
|
return ret;
|
||||||
},
|
},
|
||||||
observe: async (
|
observe: async (
|
||||||
{ workspace, id }: WorkspaceAndBlockId,
|
{ workspace, id }: WorkspaceAndBlockId,
|
||||||
|
|||||||
Reference in New Issue
Block a user