mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
Move setSticky() call
This commit is contained in:
parent
35f0bc5af6
commit
436d76a81e
2 changed files with 3 additions and 4 deletions
|
@ -547,10 +547,6 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
|||
assert self.mw.pm.profile is not None
|
||||
js = f"loadNote({self.note.id}, {self.note.mid});"
|
||||
|
||||
if self.addMode:
|
||||
sticky = [field["sticky"] for field in self.note_type()["flds"]]
|
||||
js += " setSticky(%s);" % json.dumps(sticky)
|
||||
|
||||
if self.current_notetype_is_image_occlusion():
|
||||
io_field_indices = self.mw.backend.get_image_occlusion_fields(self.note.mid)
|
||||
image_field = self.note.fields[io_field_indices.image]
|
||||
|
|
|
@ -640,6 +640,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
setShrinkImages(true);
|
||||
// TODO: closeHTMLTags col config
|
||||
setCloseHTMLTags(true);
|
||||
if (mode === "add") {
|
||||
setSticky(notetype.fields.map((field) => field.config?.sticky ?? false));
|
||||
}
|
||||
triggerChanges();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue