From 1a9e9e858e465633763537c0cff4b91261bf5879 Mon Sep 17 00:00:00 2001 From: BtbN Date: Sat, 28 Dec 2024 22:03:35 +0100 Subject: [PATCH] RFC: FSRS: ignore initial reviews until first longer break --- rslib/src/scheduler/fsrs/params.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rslib/src/scheduler/fsrs/params.rs b/rslib/src/scheduler/fsrs/params.rs index 84fbed48b8a..04c92b35b85 100644 --- a/rslib/src/scheduler/fsrs/params.rs +++ b/rslib/src/scheduler/fsrs/params.rs @@ -331,6 +331,12 @@ pub(crate) fn reviews_for_fsrs( if idx > 0 { entries.drain(..idx); } + for i in 1..entries.len() { + if entries[i].id.0 - entries[i - 1].id.0 >= 2*60*60*1000 { //TODO: make the 2h offset configurable via deck options + entries.drain(..i); + break; + } + } } else if training { // when training, we ignore cards that don't have any learning steps return None;