mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 13:47:13 -05:00
fix leech suspension message
This commit is contained in:
parent
210c11671b
commit
c2e8c30514
1 changed files with 3 additions and 2 deletions
|
|
@ -450,7 +450,7 @@ Please do not file a bug report with Anki.<br>""")
|
||||||
self.save()
|
self.save()
|
||||||
self.moveToState("getQuestion")
|
self.moveToState("getQuestion")
|
||||||
|
|
||||||
def onCardAnsweredHook(self, card, isLeech):
|
def onCardAnsweredHook(self, cardId, isLeech):
|
||||||
if not isLeech:
|
if not isLeech:
|
||||||
self.setNotice()
|
self.setNotice()
|
||||||
return
|
return
|
||||||
|
|
@ -458,7 +458,8 @@ Please do not file a bug report with Anki.<br>""")
|
||||||
<b>%s</b>... is a <a href="http://ichi2.net/anki/wiki/Leeches">leech</a>.""")
|
<b>%s</b>... is a <a href="http://ichi2.net/anki/wiki/Leeches">leech</a>.""")
|
||||||
% stripHTML(stripSounds(self.currentCard.question)).\
|
% stripHTML(stripSounds(self.currentCard.question)).\
|
||||||
replace("\n", " ")[0:30])
|
replace("\n", " ")[0:30])
|
||||||
if isLeech:
|
if isLeech and self.deck.s.scalar(
|
||||||
|
"select 1 from cards where id = :id and priority < 1", id=cardId):
|
||||||
txt += _(" It has been suspended.")
|
txt += _(" It has been suspended.")
|
||||||
self.setNotice(txt)
|
self.setNotice(txt)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue