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.writeSQL(self.s)
|
||||
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)
|
||||
if isLeech:
|
||||
self.handleLeech(card)
|
||||
runHook("cardAnswered", card.id, isLeech)
|
||||
self.setUndoEnd(undoName)
|
||||
self.requeueCard(card, oldSuc)
|
||||
|
||||
def isLeech(self, card):
|
||||
no = card.noCount
|
||||
|
|
Loading…
Reference in a new issue