From 2ff2ad6bcae8e32d276e08d8f89e683f2d16c4af Mon Sep 17 00:00:00 2001 From: Abdo Date: Wed, 27 Aug 2025 03:06:01 +0300 Subject: [PATCH] Formatting --- ts/routes/editor/NoteEditor.svelte | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ts/routes/editor/NoteEditor.svelte b/ts/routes/editor/NoteEditor.svelte index 4796a8959..a2b5e27f5 100644 --- a/ts/routes/editor/NoteEditor.svelte +++ b/ts/routes/editor/NoteEditor.svelte @@ -305,11 +305,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export let selectedDeck: DeckNameId | null = null; async function onNotetypeChange(notetype: NotetypeNameId) { - loadNote(0n, notetype.id, 0, null, reviewerCard?.id ?? null); + loadNote(0n, notetype.id, 0, null, reviewerCard?.id ?? null, false, note); if ( - !(await getConfigBool({ - key: ConfigKey_Bool.ADDING_DEFAULTS_TO_CURRENT_DECK, - })).val + !( + await getConfigBool({ + key: ConfigKey_Bool.ADDING_DEFAULTS_TO_CURRENT_DECK, + }) + ).val ) { const deckId = await defaultDeckForNotetype({ ntid: notetype.id }); deckChooser.select(deckId.did); @@ -1148,9 +1150,17 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html } async function reloadNoteIfEmpty() { - const isEmpty = (await noteFieldsCheck(note!)).state == NoteFieldsCheckResponse_State.EMPTY; + const isEmpty = + (await noteFieldsCheck(note!)).state == NoteFieldsCheckResponse_State.EMPTY; if (isEmpty) { - await loadNote(note!.id, notetypeMeta.id, 0, null, reviewerCard?.id ?? null, true); + await loadNote( + note!.id, + notetypeMeta.id, + 0, + null, + reviewerCard?.id ?? null, + true, + ); } }