Minor changes

This commit is contained in:
Hakan Shehu
2024-08-29 08:35:02 +02:00
parent a0846a6cbc
commit 3e4d3258a8
2 changed files with 5 additions and 10 deletions

View File

@@ -200,16 +200,11 @@ export class WorkspaceManager {
public async executeServerMutation(mutation: ServerMutation): Promise<void> {
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)

View File

@@ -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 }) => {