diff --git a/desktop/src/data/workspace-manager.ts b/desktop/src/data/workspace-manager.ts index f3f0e9b4..3650483d 100644 --- a/desktop/src/data/workspace-manager.ts +++ b/desktop/src/data/workspace-manager.ts @@ -200,16 +200,11 @@ export class WorkspaceManager { public async executeServerMutation(mutation: ServerMutation): Promise { if (mutation.table === 'nodes') { - if ( - mutation.after && - (mutation.action === 'insert' || mutation.action === 'update') - ) { + if (mutation.action === 'insert' && mutation.after) { await this.syncNodeFromServer(mutation.after); - } else if ( - mutation.before && - mutation.action === 'delete' && - mutation.before.id - ) { + } else if (mutation.action === 'update' && mutation.after) { + await this.syncNodeFromServer(mutation.after); + } else if (mutation.action === 'delete' && mutation.before) { await this.database .deleteFrom('nodes') .where('id', '=', mutation.before.id) diff --git a/desktop/src/editor/commands/todo.tsx b/desktop/src/editor/commands/todo.tsx index 5006727c..333f0155 100644 --- a/desktop/src/editor/commands/todo.tsx +++ b/desktop/src/editor/commands/todo.tsx @@ -4,7 +4,7 @@ export const TodoCommand: EditorCommand = { key: 'todo', name: 'To-do', description: 'Insert a to-do item', - keywords: ['to-do', 'todo', 'checklist', 'action'], + keywords: ['to-do', 'todo', 'checklist', 'action', 'task'], icon: 'task-line', disabled: false, handler: ({ editor, range }) => {