mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Replace note save call for saveTags cmd
This commit is contained in:
parent
8a87e6496c
commit
0a3710e967
2 changed files with 3 additions and 6 deletions
|
@ -468,12 +468,7 @@ require("anki/ui").loaded.then(() => require("anki/NoteEditor").instances[0].too
|
|||
self.mw.pm.profile["lastHighlightColor"] = highlightColor
|
||||
|
||||
elif cmd.startswith("saveTags"):
|
||||
(type, tagsJson) = cmd.split(":", 1)
|
||||
self.note.tags = json.loads(tagsJson)
|
||||
|
||||
gui_hooks.editor_did_update_tags(self.note)
|
||||
if not self.addMode:
|
||||
self._save_current_note()
|
||||
|
||||
elif cmd.startswith("setTagsCollapsed"):
|
||||
(type, collapsed_string) = cmd.split(":", 1)
|
||||
|
|
|
@ -283,7 +283,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
function saveTags({ detail }: CustomEvent): void {
|
||||
tagAmount = detail.tags.filter((tag: string) => tag != "").length;
|
||||
lastSavedTags = detail.tags;
|
||||
bridgeCommand(`saveTags:${JSON.stringify(detail.tags)}`);
|
||||
note!.tags = detail.tags;
|
||||
bridgeCommand("saveTags");
|
||||
updateCurrentNote();
|
||||
}
|
||||
|
||||
const fieldSave = new ChangeTimer();
|
||||
|
|
Loading…
Reference in a new issue