From 48a0640a079d9569baf113556c805e3192af501e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 19 May 2025 10:26:10 +1000 Subject: [PATCH] Revert "feat(scheduler): add from_queue flag to CardAnswer (#3976)" This reverts commit 1f95d030bbc7ebcc004ffe1e2be2a320c9fe1e94. Buggy: https://github.com/ankitects/anki/pull/3983 --- proto/anki/scheduler.proto | 1 - rslib/src/scheduler/reviews.rs | 4 ++-- rslib/src/scheduler/service/answering.rs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/proto/anki/scheduler.proto b/proto/anki/scheduler.proto index 0675465ef..364bf50ad 100644 --- a/proto/anki/scheduler.proto +++ b/proto/anki/scheduler.proto @@ -279,7 +279,6 @@ 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 79bbafb9e..983ecc452 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 d858e894e..778cf49a1 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: answer.from_queue.unwrap_or(true), + from_queue: true, } } }