mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -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.haveTop = (self.main.lastCard and (
|
||||||
self.main.config['showLastCardContent'] or
|
self.main.config['showLastCardContent'] or
|
||||||
self.main.config['showLastCardInterval'])) 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.drawRule = (self.main.config['qaDivider'] and
|
||||||
self.main.currentCard and
|
self.main.currentCard and
|
||||||
not self.main.currentCard.cardModel.questionInAnswer)
|
not self.main.currentCard.cardModel.questionInAnswer)
|
||||||
|
@ -204,13 +204,18 @@ class View(object):
|
||||||
self.drawLastCard()
|
self.drawLastCard()
|
||||||
self.buffer += "</center>"
|
self.buffer += "</center>"
|
||||||
|
|
||||||
def drawFutureWarning(self):
|
def needFutureWarning(self):
|
||||||
if not self.main.currentCard:
|
if not self.main.currentCard:
|
||||||
return
|
return
|
||||||
if self.main.currentCard.due <= time.time():
|
if self.main.currentCard.due <= time.time():
|
||||||
return
|
return
|
||||||
if self.main.currentCard.due - time.time() <= self.main.deck.delay0:
|
if self.main.currentCard.due - time.time() <= self.main.deck.delay0:
|
||||||
return
|
return
|
||||||
|
return True
|
||||||
|
|
||||||
|
def drawFutureWarning(self):
|
||||||
|
if not self.needFutureWarning():
|
||||||
|
return
|
||||||
self.write("<span style='color: %s'>" % futureWarningColour +
|
self.write("<span style='color: %s'>" % futureWarningColour +
|
||||||
_("This card was due in %s.") % fmtTimeSpan(
|
_("This card was due in %s.") % fmtTimeSpan(
|
||||||
self.main.currentCard.due - time.time()) +
|
self.main.currentCard.due - time.time()) +
|
||||||
|
|
Loading…
Reference in a new issue