mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
suspend leeches after they've been removed from the queue
This commit is contained in:
parent
fbae42d8ef
commit
a3040d1fb4
1 changed files with 4 additions and 2 deletions
|
@ -761,13 +761,15 @@ where id != :id and factId = :factId""",
|
||||||
entry = CardHistoryEntry(card, ease, lastDelay)
|
entry = CardHistoryEntry(card, ease, lastDelay)
|
||||||
entry.writeSQL(self.s)
|
entry.writeSQL(self.s)
|
||||||
self.modified = now
|
self.modified = now
|
||||||
# leech handling
|
# remove from queue
|
||||||
|
self.requeueCard(card, oldSuc)
|
||||||
|
# leech handling - we need to do this after the queue, as it may cause
|
||||||
|
# a reset()
|
||||||
isLeech = self.isLeech(card)
|
isLeech = self.isLeech(card)
|
||||||
if isLeech:
|
if isLeech:
|
||||||
self.handleLeech(card)
|
self.handleLeech(card)
|
||||||
runHook("cardAnswered", card.id, isLeech)
|
runHook("cardAnswered", card.id, isLeech)
|
||||||
self.setUndoEnd(undoName)
|
self.setUndoEnd(undoName)
|
||||||
self.requeueCard(card, oldSuc)
|
|
||||||
|
|
||||||
def isLeech(self, card):
|
def isLeech(self, card):
|
||||||
no = card.noCount
|
no = card.noCount
|
||||||
|
|
Loading…
Reference in a new issue