mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
sticky fields; add forget option to leeches
This commit is contained in:
parent
344b111b80
commit
3c269d5fba
3 changed files with 7 additions and 2 deletions
|
@ -17,7 +17,7 @@ defaultConf = {
|
|||
'minInt': 1,
|
||||
'relearn': True,
|
||||
'leechFails': 16,
|
||||
# [type, data], where type 0=suspend, 1=tagonly
|
||||
# [type, data], where type 0=suspend, 1=tagonly, 2=forget
|
||||
'leechAction': [0],
|
||||
},
|
||||
'cram': {
|
||||
|
|
|
@ -26,6 +26,7 @@ defaultField = {
|
|||
'esize': 20,
|
||||
'qcol': "#000",
|
||||
'pre': True,
|
||||
'sticky': False,
|
||||
}
|
||||
|
||||
defaultTemplate = {
|
||||
|
|
|
@ -542,9 +542,13 @@ queue = 2 %s and due <= :lim order by %s limit %d""" % (
|
|||
f.addTag("leech")
|
||||
f.flush()
|
||||
# handle
|
||||
if conf['leechAction'][0] == 0:
|
||||
a = conf['leechAction'][0]
|
||||
if a == 0:
|
||||
self.suspendCards([card.id])
|
||||
card.queue = -1
|
||||
elif a == 2:
|
||||
self.resetCards([card.id])
|
||||
card.due = 1000000
|
||||
# notify UI
|
||||
runHook("leech", card)
|
||||
|
||||
|
|
Loading…
Reference in a new issue