diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ae6817aea..491492b00 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -225,6 +225,7 @@ babofitos Jonathan Schoreels JL710 Matt Brubeck +Yaoliang Chen ******************** diff --git a/proto/anki/scheduler.proto b/proto/anki/scheduler.proto index 364bf50ad..0675465ef 100644 --- a/proto/anki/scheduler.proto +++ b/proto/anki/scheduler.proto @@ -279,6 +279,7 @@ message CardAnswer { Rating rating = 4; int64 answered_at_millis = 5; uint32 milliseconds_taken = 6; + optional bool from_queue = 7; } message CustomStudyRequest { diff --git a/rslib/src/scheduler/reviews.rs b/rslib/src/scheduler/reviews.rs index 983ecc452..79bbafb9e 100644 --- a/rslib/src/scheduler/reviews.rs +++ b/rslib/src/scheduler/reviews.rs @@ -163,10 +163,10 @@ impl Collection { rating, milliseconds_taken: 0, answered_at_millis: TimestampMillis::now().into(), + // Process the card without updating queues yet + from_queue: Some(false), } .into(); - // Process the card without updating queues yet - answer.from_queue = false; col.answer_card_inner(&mut answer)?; } Ok(()) diff --git a/rslib/src/scheduler/service/answering.rs b/rslib/src/scheduler/service/answering.rs index 778cf49a1..d858e894e 100644 --- a/rslib/src/scheduler/service/answering.rs +++ b/rslib/src/scheduler/service/answering.rs @@ -21,7 +21,7 @@ impl From for CardAnswer { answered_at: TimestampMillis(answer.answered_at_millis), milliseconds_taken: answer.milliseconds_taken, custom_data, - from_queue: true, + from_queue: answer.from_queue.unwrap_or(true), } } }