fix handling of note objects in NoteSimple and NoteSub

This commit is contained in:
bunnybeam 2025-06-19 19:56:44 +01:00
parent 1a14424be8
commit 487cfed5f3
No known key found for this signature in database
4 changed files with 22 additions and 20 deletions

View file

@ -51,11 +51,13 @@ const props = defineProps<{
const showContent = ref(prefer.s.uncollapseCW);
const isDeleted = ref(false);
const mergedCW = computed(() => computeMergedCw(props.note));
const note = ref(deepClone(props.note));
setupNoteViewInterruptors(note, isDeleted);
const mergedCW = computed(() => computeMergedCw(note.value));
if (!note.value.isSchedule) {
setupNoteViewInterruptors(note, null);
}
const emit = defineEmits<{
(ev: 'editScheduleNote'): void;
@ -69,7 +71,7 @@ async function deleteScheduleNote() {
cancelText: i18n.ts.cancel,
});
if (canceled) return;
await os.apiWithDialog('notes/schedule/delete', { noteId: props.note.id })
await os.apiWithDialog('notes/schedule/delete', { noteId: note.value.id })
.then(() => {
isDeleted.value = true;
});