From 943c9a0e5faf6156837379997d4dd826a76a15a8 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 23 Nov 2010 15:33:54 +0900 Subject: [PATCH] make sure the finished message displays cards due tomorrow --- anki/deck.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/anki/deck.py b/anki/deck.py index d9d0f51ed..86e523b6c 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -1069,7 +1069,7 @@ At this time tomorrow:
'wait': ngettext("There will be %s review.", "There will be %s reviews.", cards) % cards, } - if next - time.time() > 86400 and not newCardsTomorrow: + if next > (self.dueCutoff+86400) and not newCardsTomorrow: msg = (_("The next review is in %s.") % self.earliestTimeStr()) else: @@ -1089,7 +1089,12 @@ limit 1""")) select combinedDue+%d from cards c where type = 0 and combinedDue > :lim order by combinedDue limit 1""" % self.delay0)) - return min(earliestRev, earliestFail) + if earliestRev and earliestFail: + return min(earliestRev, earliestFail) + elif earliestRev: + return earliestRev + else: + return earliestFail def earliestTimeStr(self, next=None): """Return the relative time to the earliest card as a string."""