mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't add extra <br> when in final drill
This commit is contained in:
parent
88c8319631
commit
d87d48eff9
1 changed files with 7 additions and 2 deletions
|
@ -56,7 +56,7 @@ class View(object):
|
|||
self.haveTop = (self.main.lastCard and (
|
||||
self.main.config['showLastCardContent'] or
|
||||
self.main.config['showLastCardInterval'])) or (
|
||||
self.main.currentCard and self.main.currentCard.due > time.time())
|
||||
self.needFutureWarning())
|
||||
self.drawRule = (self.main.config['qaDivider'] and
|
||||
self.main.currentCard and
|
||||
not self.main.currentCard.cardModel.questionInAnswer)
|
||||
|
@ -204,13 +204,18 @@ class View(object):
|
|||
self.drawLastCard()
|
||||
self.buffer += "</center>"
|
||||
|
||||
def drawFutureWarning(self):
|
||||
def needFutureWarning(self):
|
||||
if not self.main.currentCard:
|
||||
return
|
||||
if self.main.currentCard.due <= time.time():
|
||||
return
|
||||
if self.main.currentCard.due - time.time() <= self.main.deck.delay0:
|
||||
return
|
||||
return True
|
||||
|
||||
def drawFutureWarning(self):
|
||||
if not self.needFutureWarning():
|
||||
return
|
||||
self.write("<span style='color: %s'>" % futureWarningColour +
|
||||
_("This card was due in %s.") % fmtTimeSpan(
|
||||
self.main.currentCard.due - time.time()) +
|
||||
|
|
Loading…
Reference in a new issue