countsIdx return a queue type.

I missed this constant before
This commit is contained in:
Arthur Milchior 2020-03-01 13:00:36 +01:00
parent 8960d12aac
commit ab9999dbc9
2 changed files with 4 additions and 4 deletions

View file

@ -106,8 +106,8 @@ class Scheduler:
counts = [self.newCount, self.lrnCount, self.revCount]
if card:
idx = self.countIdx(card)
if idx == 1:
counts[1] += card.left // 1000
if idx == QUEUE_TYPE_LRN:
counts[QUEUE_TYPE_LRN] += card.left // 1000
else:
counts[idx] += 1
@ -139,7 +139,7 @@ order by due"""
def countIdx(self, card: Card) -> int:
if card.queue == QUEUE_TYPE_DAY_LEARN_RELEARN:
return 1
return QUEUE_TYPE_LRN
return card.queue
def answerButtons(self, card: Card) -> int:

View file

@ -161,7 +161,7 @@ order by due"""
def countIdx(self, card: Card) -> int:
if card.queue in (QUEUE_TYPE_DAY_LEARN_RELEARN, QUEUE_TYPE_PREVIEW):
return 1
return QUEUE_TYPE_LRN
return card.queue
def answerButtons(self, card: Card) -> int: