mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -04:00
countsIdx return a queue type.
I missed this constant before
This commit is contained in:
parent
8960d12aac
commit
ab9999dbc9
2 changed files with 4 additions and 4 deletions
|
@ -106,8 +106,8 @@ class Scheduler:
|
||||||
counts = [self.newCount, self.lrnCount, self.revCount]
|
counts = [self.newCount, self.lrnCount, self.revCount]
|
||||||
if card:
|
if card:
|
||||||
idx = self.countIdx(card)
|
idx = self.countIdx(card)
|
||||||
if idx == 1:
|
if idx == QUEUE_TYPE_LRN:
|
||||||
counts[1] += card.left // 1000
|
counts[QUEUE_TYPE_LRN] += card.left // 1000
|
||||||
else:
|
else:
|
||||||
counts[idx] += 1
|
counts[idx] += 1
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ order by due"""
|
||||||
|
|
||||||
def countIdx(self, card: Card) -> int:
|
def countIdx(self, card: Card) -> int:
|
||||||
if card.queue == QUEUE_TYPE_DAY_LEARN_RELEARN:
|
if card.queue == QUEUE_TYPE_DAY_LEARN_RELEARN:
|
||||||
return 1
|
return QUEUE_TYPE_LRN
|
||||||
return card.queue
|
return card.queue
|
||||||
|
|
||||||
def answerButtons(self, card: Card) -> int:
|
def answerButtons(self, card: Card) -> int:
|
||||||
|
|
|
@ -161,7 +161,7 @@ order by due"""
|
||||||
|
|
||||||
def countIdx(self, card: Card) -> int:
|
def countIdx(self, card: Card) -> int:
|
||||||
if card.queue in (QUEUE_TYPE_DAY_LEARN_RELEARN, QUEUE_TYPE_PREVIEW):
|
if card.queue in (QUEUE_TYPE_DAY_LEARN_RELEARN, QUEUE_TYPE_PREVIEW):
|
||||||
return 1
|
return QUEUE_TYPE_LRN
|
||||||
return card.queue
|
return card.queue
|
||||||
|
|
||||||
def answerButtons(self, card: Card) -> int:
|
def answerButtons(self, card: Card) -> int:
|
||||||
|
|
Loading…
Reference in a new issue