dueCounts()

This commit is contained in:
Damien Elmes 2011-09-09 18:40:46 +09:00
parent 362ae3eee2
commit af2b2373b9

View file

@ -67,10 +67,13 @@ class Scheduler(object):
def counts(self):
"Does not include fetched but unanswered."
if self.deck.conf['counts'] == COUNT_REMAINING:
return (self.newCount, self.lrnCount, self.revCount)
return self.dueCounts()
else:
return self.answeredCounts()
def dueCounts(self):
return (self.newCount, self.lrnCount, self.revCount)
def answeredCounts(self):
t = self.deck.groups.top()
return (t['newToday'][1], t['lrnToday'][1], t['revToday'][1])