mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
remove obsolote newSpacedCount()
This commit is contained in:
parent
d2ac7fc13e
commit
d67b4b2ed9
1 changed files with 2 additions and 8 deletions
10
anki/deck.py
10
anki/deck.py
|
@ -733,7 +733,7 @@ and priority in (1,2,3,4) and type in (0, 1)""", time=time)
|
||||||
def deckFinishedMsg(self):
|
def deckFinishedMsg(self):
|
||||||
self.resetAfterReviewEarly()
|
self.resetAfterReviewEarly()
|
||||||
spaceSusp = ""
|
spaceSusp = ""
|
||||||
c= self.newSpacedCount()
|
c= self.spacedCardCount()
|
||||||
if c:
|
if c:
|
||||||
spaceSusp += ngettext('There is <b>%d delayed</b> new card.',
|
spaceSusp += ngettext('There is <b>%d delayed</b> new card.',
|
||||||
'There are <b>%d delayed</b> new cards.',
|
'There are <b>%d delayed</b> new cards.',
|
||||||
|
@ -861,6 +861,7 @@ select count(id) from cards where type in (0,1,2) and priority = 0""")
|
||||||
self._dailyStats.newEase4)
|
self._dailyStats.newEase4)
|
||||||
|
|
||||||
def spacedCardCount(self):
|
def spacedCardCount(self):
|
||||||
|
"Number of spaced new cards."
|
||||||
return self.s.scalar("""
|
return self.s.scalar("""
|
||||||
select count(cards.id) from cards %s where
|
select count(cards.id) from cards %s where
|
||||||
type = 2 and isDue = 0 and priority in (1,2,3,4) and combinedDue > :now
|
type = 2 and isDue = 0 and priority in (1,2,3,4) and combinedDue > :now
|
||||||
|
@ -884,13 +885,6 @@ and due < :now""" % self.forceIndex("ix_cards_priorityDue"), now=time.time())
|
||||||
return self.s.scalar(
|
return self.s.scalar(
|
||||||
"select count(id) from cards where type = 2")
|
"select count(id) from cards where type = 2")
|
||||||
|
|
||||||
def newSpacedCount(self):
|
|
||||||
"Cards that are both spaced and new."
|
|
||||||
return self.s.scalar("""
|
|
||||||
select count(cards.id) from cards where
|
|
||||||
type = 2 and isDue = 0 and priority in (1,2,3,4) and combinedDue > :now
|
|
||||||
and due < :now""", now=time.time())
|
|
||||||
|
|
||||||
# Card predicates
|
# Card predicates
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue