fix v3 not honoring initial ease factor

Closes #1317
This commit is contained in:
Damien Elmes 2021-07-31 14:57:04 +10:00
parent eab56163b0
commit cf731c6bad
3 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,7 @@ impl CardStateUpdater {
steps: self.learn_steps(),
graduating_interval_good: self.config.inner.graduating_interval_good,
graduating_interval_easy: self.config.inner.graduating_interval_easy,
initial_ease_factor: self.config.inner.initial_ease,
hard_multiplier: self.config.inner.hard_multiplier,
easy_multiplier: self.config.inner.easy_multiplier,
interval_multiplier: self.config.inner.interval_multiplier,

View File

@ -44,8 +44,10 @@ impl LearnState {
}
.into()
} else {
// steps modified while card in learning
ReviewState {
scheduled_days: ctx.fuzzed_graduating_interval_good(),
ease_factor: ctx.initial_ease_factor,
..Default::default()
}
.into()
@ -62,6 +64,7 @@ impl LearnState {
} else {
ReviewState {
scheduled_days: ctx.fuzzed_graduating_interval_good(),
ease_factor: ctx.initial_ease_factor,
..Default::default()
}
.into()
@ -71,6 +74,7 @@ impl LearnState {
fn answer_easy(self, ctx: &StateContext) -> ReviewState {
ReviewState {
scheduled_days: ctx.fuzzed_graduating_interval_easy(),
ease_factor: ctx.initial_ease_factor,
..Default::default()
}
}

View File

@ -75,6 +75,7 @@ pub(crate) struct StateContext<'a> {
pub steps: LearningSteps<'a>,
pub graduating_interval_good: u32,
pub graduating_interval_easy: u32,
pub initial_ease_factor: f32,
// reviewing
pub hard_multiplier: f32,