mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
fallback to non_manual_entries if the first learning step is before the ignore date
This commit is contained in:
parent
5414aebaa9
commit
afafc31445
1 changed files with 1 additions and 9 deletions
|
@ -308,17 +308,9 @@ pub(crate) fn single_card_revlog_to_items(
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// While reviewing if the first learning step is before the ignore date,
|
// While reviewing if the first learning step is before the ignore date,
|
||||||
// ignore every review before and including the last learning step
|
// fallback to non_manual_entries
|
||||||
if let Some(idx) = first_of_last_learn_entries {
|
if let Some(idx) = first_of_last_learn_entries {
|
||||||
if entries[idx].id.0 < ignore_revlogs_before.0 && idx < entries.len() - 1 {
|
if entries[idx].id.0 < ignore_revlogs_before.0 && idx < entries.len() - 1 {
|
||||||
let last_learn_entry = entries
|
|
||||||
.iter()
|
|
||||||
.enumerate()
|
|
||||||
.rev()
|
|
||||||
.find(|(_idx, e)| e.review_kind == RevlogReviewKind::Learning)
|
|
||||||
.map(|(idx, _)| idx);
|
|
||||||
|
|
||||||
entries.drain(..(last_learn_entry? + 1));
|
|
||||||
revlogs_complete = false;
|
revlogs_complete = false;
|
||||||
first_of_last_learn_entries = None;
|
first_of_last_learn_entries = None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue