mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
refresh new/rev counts when fillNew/fillRev() fails
This was the behaviour before, but got lost when ._reset_counts() was added. Also added the check back to schedv2:fillRev(), which also appears to have gotten lost in the move to ._reset_counts() Just a stop-gap fix until this code can get a proper rewrite.
This commit is contained in:
parent
ce2315591f
commit
10757d563d
2 changed files with 8 additions and 1 deletions
|
|
@ -492,6 +492,7 @@ did = ? and queue = {QUEUE_TYPE_REV} and due <= ? limit ?""",
|
|||
if recursing:
|
||||
print("bug: fillRev()")
|
||||
return False
|
||||
self._reset_counts()
|
||||
self._resetRev()
|
||||
return self._fillRev(recursing=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@ order by due"""
|
|||
if recursing:
|
||||
print("bug: fillNew()")
|
||||
return False
|
||||
self._reset_counts()
|
||||
self._resetNew()
|
||||
return self._fillNew(recursing=True)
|
||||
|
||||
|
|
@ -862,7 +863,12 @@ limit ?"""
|
|||
self._revQueue.reverse()
|
||||
return True
|
||||
|
||||
return False
|
||||
if recursing:
|
||||
print("bug: fillRev2()")
|
||||
return False
|
||||
self._reset_counts()
|
||||
self._resetRev()
|
||||
return self._fillRev(recursing=True)
|
||||
|
||||
def _getRevCard(self) -> Optional[Card]:
|
||||
if self._fillRev():
|
||||
|
|
|
|||
Loading…
Reference in a new issue