mirror of
https://github.com/ankitects/anki.git
synced 2025-12-31 07:43:02 -05:00
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:
parent
0c19c192a5
commit
d881506ba2
1 changed files with 3 additions and 0 deletions
|
|
@ -1693,6 +1693,9 @@ update cards set usn=?, mod=?, did=? where id in """
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue