QUEUE_USER_BURIED

This commit is contained in:
Arthur Milchior 2020-01-30 19:21:20 -08:00
parent 69436643fe
commit 4a21911d74
4 changed files with 5 additions and 4 deletions

View file

@ -15,6 +15,7 @@ NEW_CARDS_RANDOM = 0
NEW_CARDS_DUE = 1
# Queue types
QUEUE_TYPE_MANUALLY_BURIED = -3
QUEUE_TYPE_NEW = 0
QUEUE_TYPE_LRN = 1

View file

@ -278,7 +278,7 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """
elif val == "suspended":
return "c.queue = -1"
elif val == "buried":
return "c.queue in (-2, -3)"
return f"c.queue in (-2, {QUEUE_TYPE_MANUALLY_BURIED})"
elif val == "due":
return f"""
(c.queue in (2,3) and c.due <= %d) or

View file

@ -28,7 +28,7 @@ CARD_TYPE_RELEARNING = 3
QUEUE_TYPE_PREVIEW = 4
QUEUE_TYPE_DAY_LEARN_RELEARN = 3
QUEUE_TYPE_SIBLING_BURIED = -2
QUEUE_TYPE_MANUALLY_BURIED = -3
# revlog types: 0=lrn, 1=rev, 2=relrn, 3=early review
# positive revlog intervals are in days (rev), negative in seconds (lrn)
# odue/odid store original due/did when cards moved to filtered deck

View file

@ -624,7 +624,7 @@ def test_bury():
# burying
d.sched.buryCards([c.id], manual=True) # pylint: disable=unexpected-keyword-arg
c.load()
assert c.queue == -3
assert c.queue == QUEUE_TYPE_MANUALLY_BURIED
d.sched.buryCards([c2.id], manual=False) # pylint: disable=unexpected-keyword-arg
c2.load()
assert c2.queue == -2
@ -1226,7 +1226,7 @@ def test_moveVersions():
col.sched.answerCard(c, 1)
col.sched.buryCards([c.id])
c.load()
assert c.queue == -3
assert c.queue == QUEUE_TYPE_MANUALLY_BURIED
# revert to version 1
col.changeSchedulerVer(1)