remove 'tomorrow' special case, add boost for initial 2

This commit is contained in:
Damien Elmes 2008-11-13 17:16:27 +09:00
parent b6471b15e8
commit 61972d32d7

View file

@ -440,7 +440,10 @@ strftime("%s", "now")+1 from decks)"""))
interval = random.uniform(self.easyIntervalMin, interval = random.uniform(self.easyIntervalMin,
self.easyIntervalMax) self.easyIntervalMax)
else: else:
# otherwise, multiply the old interval by a factor # if the last interval was initial hard, boost it
if interval < self.hardIntervalMax:
interval = self.hardIntervalMax * 3.5;
# multiply last interval by factor
if ease == 2: if ease == 2:
interval = (interval + delay/4) * 1.2 interval = (interval + delay/4) * 1.2
elif ease == 3: elif ease == 3:
@ -455,12 +458,6 @@ strftime("%s", "now")+1 from decks)"""))
def nextIntervalStr(self, card, ease, short=False): def nextIntervalStr(self, card, ease, short=False):
"Return the next interval for CARD given EASE as a string." "Return the next interval for CARD given EASE as a string."
if card.interval == 0 and ease == 2:
if short:
return _("tom.")
else:
return _("Tomorrow")
else:
int = self.nextInterval(card, ease) int = self.nextInterval(card, ease)
return anki.utils.fmtTimeSpan(int*86400, short=short) return anki.utils.fmtTimeSpan(int*86400, short=short)