mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't terminate review abruptly when sibs removed from queue
This commit is contained in:
parent
3348b091d0
commit
d8149910eb
1 changed files with 12 additions and 5 deletions
|
@ -49,7 +49,6 @@ class Scheduler(object):
|
||||||
return card
|
return card
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
deck = self.col.decks.current()
|
|
||||||
self._updateCutoff()
|
self._updateCutoff()
|
||||||
self._resetLrn()
|
self._resetLrn()
|
||||||
self._resetRev()
|
self._resetRev()
|
||||||
|
@ -369,8 +368,12 @@ select id from cards where did = ? and queue = 0 limit ?""", did, lim)
|
||||||
return True
|
return True
|
||||||
# nothing left in the deck; move to next
|
# nothing left in the deck; move to next
|
||||||
self._newDids.pop(0)
|
self._newDids.pop(0)
|
||||||
# if count>0 but queue empty, the other cards were buried
|
if self.newCount:
|
||||||
self.newCount = 0
|
# if we didn't get a card but the count is non-zero,
|
||||||
|
# we need to check again for any cards that were
|
||||||
|
# removed from the queue but not buried
|
||||||
|
self._resetNew()
|
||||||
|
return self._fillNew()
|
||||||
|
|
||||||
def _getNewCard(self):
|
def _getNewCard(self):
|
||||||
if self._fillNew():
|
if self._fillNew():
|
||||||
|
@ -774,8 +777,12 @@ did = ? and queue = 2 and due <= ? limit ?""",
|
||||||
return True
|
return True
|
||||||
# nothing left in the deck; move to next
|
# nothing left in the deck; move to next
|
||||||
self._revDids.pop(0)
|
self._revDids.pop(0)
|
||||||
# if count>0 but queue empty, the other cards were buried
|
if self.revCount:
|
||||||
self.revCount = 0
|
# if we didn't get a card but the count is non-zero,
|
||||||
|
# we need to check again for any cards that were
|
||||||
|
# removed from the queue but not buried
|
||||||
|
self._resetRev()
|
||||||
|
return self._fillRev()
|
||||||
|
|
||||||
def _getRevCard(self):
|
def _getRevCard(self):
|
||||||
if self._fillRev():
|
if self._fillRev():
|
||||||
|
|
Loading…
Reference in a new issue