mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
unbury cards when returning to deck list
This commit is contained in:
parent
acae66d60e
commit
133d4c2e8e
3 changed files with 4 additions and 3 deletions
|
@ -172,7 +172,7 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?, conf=?""",
|
|||
def cleanup(self):
|
||||
"Unsuspend any temporarily suspended cards."
|
||||
if self.dty:
|
||||
self.sched.onClose()
|
||||
self.sched.unburyCards()
|
||||
self.dty = False
|
||||
|
||||
def usn(self):
|
||||
|
|
|
@ -125,7 +125,7 @@ order by due""" % self._deckLimit(),
|
|||
else:
|
||||
return 3
|
||||
|
||||
def onClose(self):
|
||||
def unburyCards(self):
|
||||
"Unbury cards when closing."
|
||||
self.col.db.execute(
|
||||
"update cards set queue = type where queue = -2")
|
||||
|
@ -189,6 +189,7 @@ order by due""" % self._deckLimit(),
|
|||
"Returns [deckname, did, rev, lrn, new]"
|
||||
self._checkDay()
|
||||
self.col.decks.recoverOrphans()
|
||||
self.unburyCards()
|
||||
decks = self.col.decks.all()
|
||||
decks.sort(key=itemgetter('name'))
|
||||
lims = {}
|
||||
|
|
|
@ -486,7 +486,7 @@ def test_misc():
|
|||
d.sched.buryNote(c.nid)
|
||||
d.reset()
|
||||
assert not d.sched.getCard()
|
||||
d.sched.onClose()
|
||||
d.sched.unburyCards()
|
||||
d.reset()
|
||||
assert d.sched.getCard()
|
||||
|
||||
|
|
Loading…
Reference in a new issue