fix old content appearing when flagging

https://forums.ankiweb.net/t/very-specific-but-quite-consistent-bug-in-browser/3685
This commit is contained in:
Damien Elmes 2020-09-27 12:31:25 +10:00
parent 1827063e4f
commit 2f654bcb88

View File

@ -1679,6 +1679,9 @@ where id in %s"""
def onSetFlag(self, n): def onSetFlag(self, n):
if not self.card: if not self.card:
return return
self.editor.saveNow(lambda: self._on_set_flag(n))
def _on_set_flag(self, n: int):
# flag needs toggling off? # flag needs toggling off?
if n == self.card.userFlag(): if n == self.card.userFlag():
n = 0 n = 0