Merge pull request #478 from Arthur-Milchior/missing_constant

countsIdx return a queue type.
This commit is contained in:
Damien Elmes 2020-03-02 15:43:31 +10:00 committed by GitHub
commit 9f73d67b5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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: