mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
fix misnamed timer property in deck config
The old JSON stored it as an int, but it's used as a boolean
This commit is contained in:
parent
32ffd20c23
commit
dac990e4c2
3 changed files with 4 additions and 4 deletions
|
@ -353,7 +353,7 @@ message DeckConfig {
|
||||||
|
|
||||||
bool disable_autoplay = 23;
|
bool disable_autoplay = 23;
|
||||||
uint32 cap_answer_time_to_secs = 24;
|
uint32 cap_answer_time_to_secs = 24;
|
||||||
uint32 visible_timer_secs = 25;
|
bool show_timer = 25;
|
||||||
bool skip_question_when_replaying_answer = 26;
|
bool skip_question_when_replaying_answer = 26;
|
||||||
|
|
||||||
bool bury_new = 27;
|
bool bury_new = 27;
|
||||||
|
|
|
@ -61,7 +61,7 @@ impl Default for DeckConf {
|
||||||
leech_threshold: 8,
|
leech_threshold: 8,
|
||||||
disable_autoplay: false,
|
disable_autoplay: false,
|
||||||
cap_answer_time_to_secs: 60,
|
cap_answer_time_to_secs: 60,
|
||||||
visible_timer_secs: 0,
|
show_timer: false,
|
||||||
skip_question_when_replaying_answer: false,
|
skip_question_when_replaying_answer: false,
|
||||||
bury_new: false,
|
bury_new: false,
|
||||||
bury_reviews: false,
|
bury_reviews: false,
|
||||||
|
|
|
@ -268,7 +268,7 @@ impl From<DeckConfSchema11> for DeckConf {
|
||||||
leech_threshold: c.lapse.leech_fails,
|
leech_threshold: c.lapse.leech_fails,
|
||||||
disable_autoplay: !c.autoplay,
|
disable_autoplay: !c.autoplay,
|
||||||
cap_answer_time_to_secs: c.max_taken.max(0) as u32,
|
cap_answer_time_to_secs: c.max_taken.max(0) as u32,
|
||||||
visible_timer_secs: c.timer as u32,
|
show_timer: c.timer != 0,
|
||||||
skip_question_when_replaying_answer: !c.replayq,
|
skip_question_when_replaying_answer: !c.replayq,
|
||||||
bury_new: c.new.bury,
|
bury_new: c.new.bury,
|
||||||
bury_reviews: c.rev.bury,
|
bury_reviews: c.rev.bury,
|
||||||
|
@ -313,7 +313,7 @@ impl From<DeckConf> for DeckConfSchema11 {
|
||||||
usn: c.usn,
|
usn: c.usn,
|
||||||
max_taken: i.cap_answer_time_to_secs as i32,
|
max_taken: i.cap_answer_time_to_secs as i32,
|
||||||
autoplay: !i.disable_autoplay,
|
autoplay: !i.disable_autoplay,
|
||||||
timer: i.visible_timer_secs as u8,
|
timer: if i.show_timer { 1 } else { 0 },
|
||||||
replayq: !i.skip_question_when_replaying_answer,
|
replayq: !i.skip_question_when_replaying_answer,
|
||||||
dynamic: false,
|
dynamic: false,
|
||||||
new: NewConfSchema11 {
|
new: NewConfSchema11 {
|
||||||
|
|
Loading…
Reference in a new issue