mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
BUTTON_THREE
This commit is contained in:
parent
4fb0a48962
commit
e4022eeb47
3 changed files with 8 additions and 7 deletions
|
@ -66,6 +66,7 @@ LEECH_TAGONLY = 1
|
||||||
# Buttons
|
# Buttons
|
||||||
BUTTON_ONE = 1
|
BUTTON_ONE = 1
|
||||||
BUTTON_TWO = 2
|
BUTTON_TWO = 2
|
||||||
|
BUTTON_THREE = 3
|
||||||
|
|
||||||
# Labels
|
# Labels
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
|
@ -565,7 +565,7 @@ did = ? and queue = 3 and due <= ? limit ?""",
|
||||||
# lrnCount was decremented once when card was fetched
|
# lrnCount was decremented once when card was fetched
|
||||||
lastLeft = card.left
|
lastLeft = card.left
|
||||||
# immediate graduate?
|
# immediate graduate?
|
||||||
if ease == 3:
|
if ease == BUTTON_THREE:
|
||||||
self._rescheduleAsRev(card, conf, True)
|
self._rescheduleAsRev(card, conf, True)
|
||||||
leaving = True
|
leaving = True
|
||||||
# graduation time?
|
# graduation time?
|
||||||
|
@ -971,7 +971,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)"""
|
||||||
)
|
)
|
||||||
if ease == BUTTON_TWO:
|
if ease == BUTTON_TWO:
|
||||||
interval = ivl2
|
interval = ivl2
|
||||||
elif ease == 3:
|
elif ease == BUTTON_THREE:
|
||||||
interval = ivl3
|
interval = ivl3
|
||||||
elif ease == 4:
|
elif ease == 4:
|
||||||
interval = ivl4
|
interval = ivl4
|
||||||
|
@ -1367,7 +1367,7 @@ To study outside of the normal schedule, click the Custom Study button below."""
|
||||||
if ease == BUTTON_ONE:
|
if ease == BUTTON_ONE:
|
||||||
# fail
|
# fail
|
||||||
return self._delayForGrade(conf, len(conf["delays"]))
|
return self._delayForGrade(conf, len(conf["delays"]))
|
||||||
elif ease == 3:
|
elif ease == BUTTON_THREE:
|
||||||
# early removal
|
# early removal
|
||||||
if not self._resched(card):
|
if not self._resched(card):
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -621,7 +621,7 @@ did = ? and queue = {QUEUE_TYPE_DAY_LEARN_RELEARN} and due <= ? limit ?""",
|
||||||
self._rescheduleAsRev(card, conf, True)
|
self._rescheduleAsRev(card, conf, True)
|
||||||
leaving = True
|
leaving = True
|
||||||
# next step?
|
# next step?
|
||||||
elif ease == 3:
|
elif ease == BUTTON_THREE:
|
||||||
# graduation time?
|
# graduation time?
|
||||||
if (card.left % 1000) - 1 <= 0:
|
if (card.left % 1000) - 1 <= 0:
|
||||||
self._rescheduleAsRev(card, conf, False)
|
self._rescheduleAsRev(card, conf, False)
|
||||||
|
@ -1052,7 +1052,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)"""
|
||||||
return ivl2
|
return ivl2
|
||||||
|
|
||||||
ivl3 = self._constrainedIvl((card.ivl + delay // 2) * fct, conf, ivl2, fuzz)
|
ivl3 = self._constrainedIvl((card.ivl + delay // 2) * fct, conf, ivl2, fuzz)
|
||||||
if ease == 3:
|
if ease == BUTTON_THREE:
|
||||||
return ivl3
|
return ivl3
|
||||||
|
|
||||||
ivl4 = self._constrainedIvl(
|
ivl4 = self._constrainedIvl(
|
||||||
|
@ -1119,7 +1119,7 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)"""
|
||||||
# hard cards shouldn't have their interval decreased by more than 50%
|
# hard cards shouldn't have their interval decreased by more than 50%
|
||||||
# of the normal factor
|
# of the normal factor
|
||||||
minNewIvl = factor / 2
|
minNewIvl = factor / 2
|
||||||
elif ease == 3:
|
elif ease == BUTTON_THREE:
|
||||||
factor = card.factor / 1000
|
factor = card.factor / 1000
|
||||||
else: # ease == 4:
|
else: # ease == 4:
|
||||||
factor = card.factor / 1000
|
factor = card.factor / 1000
|
||||||
|
@ -1591,7 +1591,7 @@ To study outside of the normal schedule, click the Custom Study button below."""
|
||||||
return self._delayForRepeatingGrade(conf, card.left)
|
return self._delayForRepeatingGrade(conf, card.left)
|
||||||
elif ease == 4:
|
elif ease == 4:
|
||||||
return self._graduatingIvl(card, conf, True, fuzz=False) * 86400
|
return self._graduatingIvl(card, conf, True, fuzz=False) * 86400
|
||||||
else: # ease == 3
|
else: # ease == BUTTON_THREE
|
||||||
left = card.left % 1000 - 1
|
left = card.left % 1000 - 1
|
||||||
if left <= 0:
|
if left <= 0:
|
||||||
# graduate
|
# graduate
|
||||||
|
|
Loading…
Reference in a new issue