only set lastDue if card is not new, hide due for new cards in stats

This commit is contained in:
Damien Elmes 2009-06-19 07:46:26 +09:00
parent a1981cf220
commit 3e2c150b17
2 changed files with 10 additions and 7 deletions

View file

@ -348,6 +348,8 @@ where factId in (select factId from %s limit 60))""" % (new, new))
if lastDelay >= 0:
# keep last interval if reviewing early
card.lastInterval = last
if card.reps:
# only update if card was not new
card.lastDue = card.due
card.due = self.nextDue(card, ease, oldState)
card.isDue = 0

View file

@ -265,6 +265,7 @@ class CardStats(object):
if c.firstAnswered:
self.addLine(_("First Review"), self.strTime(c.firstAnswered))
self.addLine(_("Changed"), self.strTime(c.modified))
if c.reps:
next = time.time() - c.due
if next > 0:
next = _("%s ago") % fmt(next)