diff --git a/rslib/backend.proto b/rslib/backend.proto index 7a55cf2a0..46d45ba95 100644 --- a/rslib/backend.proto +++ b/rslib/backend.proto @@ -353,7 +353,7 @@ message DeckConfig { bool disable_autoplay = 23; uint32 cap_answer_time_to_secs = 24; - uint32 visible_timer_secs = 25; + bool show_timer = 25; bool skip_question_when_replaying_answer = 26; bool bury_new = 27; diff --git a/rslib/src/deckconf/mod.rs b/rslib/src/deckconf/mod.rs index d5c593b9a..117e84f90 100644 --- a/rslib/src/deckconf/mod.rs +++ b/rslib/src/deckconf/mod.rs @@ -61,7 +61,7 @@ impl Default for DeckConf { leech_threshold: 8, disable_autoplay: false, cap_answer_time_to_secs: 60, - visible_timer_secs: 0, + show_timer: false, skip_question_when_replaying_answer: false, bury_new: false, bury_reviews: false, diff --git a/rslib/src/deckconf/schema11.rs b/rslib/src/deckconf/schema11.rs index e7edd25e5..4e663bda6 100644 --- a/rslib/src/deckconf/schema11.rs +++ b/rslib/src/deckconf/schema11.rs @@ -268,7 +268,7 @@ impl From for DeckConf { leech_threshold: c.lapse.leech_fails, disable_autoplay: !c.autoplay, 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, bury_new: c.new.bury, bury_reviews: c.rev.bury, @@ -313,7 +313,7 @@ impl From for DeckConfSchema11 { usn: c.usn, max_taken: i.cap_answer_time_to_secs as i32, 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, dynamic: false, new: NewConfSchema11 {