diff --git a/src/application/services/useNote.ts b/src/application/services/useNote.ts index 39995625..e94cacca 100644 --- a/src/application/services/useNote.ts +++ b/src/application/services/useNote.ts @@ -130,12 +130,6 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt const route = useRoute(); - /** - * Is there any note currently saving - * Used to prevent re-load note after draft is saved - */ - const isNoteSaving = ref(false); - /** * Note Title identifier */ @@ -219,8 +213,6 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt */ const specifiedNoteTools = resolveToolsByContent(content); - isNoteSaving.value = true; - if (currentId.value === null) { /** * @todo try-catch domain errors @@ -251,8 +243,6 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt * Store just saved content in memory */ lastUpdateContent.value = content; - - isNoteSaving.value = false; } /** @@ -297,7 +287,7 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt lastUpdateContent.value = null; } - watch(currentId, (newId, prevId) => { + watch(currentId, (newId, _prevId) => { /** * One note is open, user clicks on "+" to create another new note * Clear existing note @@ -308,16 +298,6 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt return; } - const isDraftSaving = prevId === null && isNoteSaving.value; - - /** - * Case for newly created note, - * we don't need to re-load it - */ - if (isDraftSaving) { - return; - } - void load(newId); }); diff --git a/src/presentation/pages/Note.vue b/src/presentation/pages/Note.vue index d0cd75aa..23a7cacb 100644 --- a/src/presentation/pages/Note.vue +++ b/src/presentation/pages/Note.vue @@ -40,6 +40,7 @@