give hard a 1.5x interval when there's only one (re)learning step

otherwise we end up with two buttons that do the same thing
This commit is contained in:
Damien Elmes 2018-02-06 15:41:56 +10:00
parent cc26d32431
commit 730d444164

View File

@ -620,7 +620,10 @@ did = ? and queue = 3 and due <= ? limit ?""",
def _delayForRepeatingGrade(self, conf, left):
# halfway between last and next
delay1 = self._delayForGrade(conf, left)
delay2 = self._delayForGrade(conf, left-1)
if len(conf['delays']) > 1:
delay2 = self._delayForGrade(conf, left-1)
else:
delay2 = delay1 * 2
avg = (delay1+max(delay1, delay2))//2
return avg