mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
remove 'tomorrow' special case, add boost for initial 2
This commit is contained in:
parent
b6471b15e8
commit
61972d32d7
1 changed files with 6 additions and 9 deletions
15
anki/deck.py
15
anki/deck.py
|
@ -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,14 +458,8 @@ 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:
|
int = self.nextInterval(card, ease)
|
||||||
if short:
|
return anki.utils.fmtTimeSpan(int*86400, short=short)
|
||||||
return _("tom.")
|
|
||||||
else:
|
|
||||||
return _("Tomorrow")
|
|
||||||
else:
|
|
||||||
int = self.nextInterval(card, ease)
|
|
||||||
return anki.utils.fmtTimeSpan(int*86400, short=short)
|
|
||||||
|
|
||||||
def nextDue(self, card, ease, oldState):
|
def nextDue(self, card, ease, oldState):
|
||||||
"Return time when CARD will expire given EASE."
|
"Return time when CARD will expire given EASE."
|
||||||
|
|
Loading…
Reference in a new issue