mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix/last date of existing card should not be positive in simulation (#3667)
* Fix/last date of existing card should not be positive in simulation * update fsrs-rs to v1.4.9 * ./ninja fix:minilints
This commit is contained in:
parent
aaf8b4dddb
commit
39bf29e1a6
1 changed files with 2 additions and 1 deletions
|
@ -75,10 +75,11 @@ impl Card {
|
|||
CardQueue::DayLearn | CardQueue::Review => {
|
||||
let due = card.original_or_current_due();
|
||||
let relative_due = due - days_elapsed;
|
||||
let last_date = (relative_due - card.interval as i32).min(0) as f32;
|
||||
Some(fsrs::Card {
|
||||
difficulty: state.difficulty,
|
||||
stability: state.stability,
|
||||
last_date: (relative_due - card.interval as i32) as f32,
|
||||
last_date,
|
||||
due: relative_due as f32,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue