only warn about a leech again after half the max fail rate

This commit is contained in:
Damien Elmes 2009-06-25 06:46:05 +09:00
parent bd0c41c3d5
commit ef4d9a42f8

View file

@ -453,8 +453,10 @@ Please do not file a bug report with Anki.<br>""")
self.moveToState("getQuestion")
def isLeech(self):
no = self.currentCard.noCount
max = self.deck.getInt('leechFails')
return (not self.currentCard.successive and
self.currentCard.noCount >= self.deck.getInt('leechFails'))
no >= max and (max - no) % (max/2) == 0)
def handleLeech(self):
self.deck.refresh()