Fix deck change after toggling sticky fields (#1415)

(cherry picked from commit ebe7125e81)
This commit is contained in:
Abdo 2021-10-09 03:26:10 +03:00 committed by Damien Elmes
parent 9b6fac5b60
commit 76bd51a7c3

View file

@ -405,7 +405,9 @@ $editorToolbar.then(({{ toolbar }}) => toolbar.appendGroup({{
result.append(fld["sticky"])
update_notetype_legacy(parent=self.mw, notetype=model).run_in_background()
update_notetype_legacy(parent=self.mw, notetype=model).run_in_background(
initiator=self
)
return result
@ -418,7 +420,9 @@ $editorToolbar.then(({{ toolbar }}) => toolbar.appendGroup({{
new_state = not fld["sticky"]
fld["sticky"] = new_state
update_notetype_legacy(parent=self.mw, notetype=model).run_in_background()
update_notetype_legacy(parent=self.mw, notetype=model).run_in_background(
initiator=self
)
return new_state