mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Formatting
This commit is contained in:
parent
6b5729ce18
commit
2ff2ad6bca
1 changed files with 16 additions and 6 deletions
|
@ -305,11 +305,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
export let selectedDeck: DeckNameId | null = null;
|
export let selectedDeck: DeckNameId | null = null;
|
||||||
|
|
||||||
async function onNotetypeChange(notetype: NotetypeNameId) {
|
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 (
|
if (
|
||||||
!(await getConfigBool({
|
!(
|
||||||
key: ConfigKey_Bool.ADDING_DEFAULTS_TO_CURRENT_DECK,
|
await getConfigBool({
|
||||||
})).val
|
key: ConfigKey_Bool.ADDING_DEFAULTS_TO_CURRENT_DECK,
|
||||||
|
})
|
||||||
|
).val
|
||||||
) {
|
) {
|
||||||
const deckId = await defaultDeckForNotetype({ ntid: notetype.id });
|
const deckId = await defaultDeckForNotetype({ ntid: notetype.id });
|
||||||
deckChooser.select(deckId.did);
|
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() {
|
async function reloadNoteIfEmpty() {
|
||||||
const isEmpty = (await noteFieldsCheck(note!)).state == NoteFieldsCheckResponse_State.EMPTY;
|
const isEmpty =
|
||||||
|
(await noteFieldsCheck(note!)).state == NoteFieldsCheckResponse_State.EMPTY;
|
||||||
if (isEmpty) {
|
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,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue