Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/application/services/useNote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt
* Is there any note currently saving
* Used to prevent re-load note after draft is saved
*/
const isNoteSaving = ref<boolean>(false);
// const isNoteSaving = ref<boolean>(false);

/**
* Note Title identifier
Expand Down Expand Up @@ -219,7 +219,7 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt
*/
const specifiedNoteTools = resolveToolsByContent(content);

isNoteSaving.value = true;
// isNoteSaving.value = true;

if (currentId.value === null) {
/**
Expand Down Expand Up @@ -252,7 +252,7 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt
*/
lastUpdateContent.value = content;

isNoteSaving.value = false;
// isNoteSaving.value = false;
}

/**
Expand Down Expand Up @@ -297,7 +297,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
Expand All @@ -308,15 +308,15 @@ export default function (options: UseNoteComposableOptions): UseNoteComposableSt
return;
}

const isDraftSaving = prevId === null && isNoteSaving.value;
// const isDraftSaving = prevId === null && isNoteSaving.value;

/**
* Case for newly created note,
* we don't need to re-load it
*/
if (isDraftSaving) {
return;
}
// if (isDraftSaving) {
// return;
// }

void load(newId);
});
Expand Down
1 change: 1 addition & 0 deletions src/presentation/pages/Note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<Editor
v-if="isEditorReady"
ref="editor"
:key="id || 'new'"
v-bind="editorConfig"
@change="noteChanged"
/>
Expand Down
Loading