Formatting

This commit is contained in:
Abdo 2025-10-19 08:41:03 +03:00
parent f9607ce8af
commit 7113648a3f

View file

@ -992,11 +992,21 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
stickyFieldsFrom,
}: LoadNoteArgs) {
// Convert values coming from Python
if(nid) nid = BigInt(nid);
if(notetypeId) notetypeId = BigInt(notetypeId);
if(deckId) deckId = BigInt(deckId);
if(originalNoteId) originalNoteId = BigInt(originalNoteId);
if(reviewerCardId) reviewerCardId = BigInt(reviewerCardId);
if (nid) {
nid = BigInt(nid);
}
if (notetypeId) {
notetypeId = BigInt(notetypeId);
}
if (deckId) {
deckId = BigInt(deckId);
}
if (originalNoteId) {
originalNoteId = BigInt(originalNoteId);
}
if (reviewerCardId) {
reviewerCardId = BigInt(reviewerCardId);
}
let homeDeckId = 0n;
if (reviewerCardId) {
@ -1012,9 +1022,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
nid: originalNoteId,
});
selectedNotetypeId = originalNote.notetypeId;
selectedDeckId = (await defaultDeckForNotetype({ ntid: originalNote.notetypeId })).did;
}
else if (initial) {
selectedDeckId = (
await defaultDeckForNotetype({ ntid: originalNote.notetypeId })
).did;
} else if (initial) {
const chooserDefaults = await defaultsForAdding({
homeDeckOfCurrentReviewCard: homeDeckId,
});
@ -1204,10 +1215,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
args.focusTo = focusedFieldIndex;
}
loadDebouncer.schedule(async () => {
await loadNoteInner(initialLoadArgs ? {
await loadNoteInner(
initialLoadArgs
? ({
...initialLoadArgs,
...args,
} as LoadNoteArgs : args as LoadNoteArgs);
} as LoadNoteArgs)
: (args as LoadNoteArgs),
);
});
}