mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Apply suggestions from code review
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
This commit is contained in:
parent
14f9c139d3
commit
4c69989479
3 changed files with 3 additions and 3 deletions
|
@ -88,7 +88,7 @@ impl RevlogEntry {
|
|||
/// Returns true if the review entry is not manually rescheduled and not
|
||||
/// cramming. Used to filter out entries that shouldn't be considered
|
||||
/// for statistics and scheduling.
|
||||
pub(crate) fn has_rating_and_affect_scheduling(&self) -> bool {
|
||||
pub(crate) fn has_rating_and_affects_scheduling(&self) -> bool {
|
||||
// not rescheduled/set due date/reset
|
||||
self.button_chosen > 0
|
||||
// not cramming
|
||||
|
|
|
@ -323,7 +323,7 @@ pub(crate) fn get_last_revlog_info(revlogs: &[RevlogEntry]) -> HashMap<CardId, L
|
|||
.for_each(|(card_id, group)| {
|
||||
let mut last_reviewed_at = None;
|
||||
for e in group.into_iter() {
|
||||
if e.has_rating_and_affect_scheduling() {
|
||||
if e.has_rating_and_affects_scheduling() {
|
||||
last_reviewed_at = Some(e.id.as_secs());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ impl GraphsContext {
|
|||
self.revlog
|
||||
.iter()
|
||||
.filter(|review| {
|
||||
review.has_rating_and_affect_scheduling()
|
||||
review.has_rating_and_affects_scheduling()
|
||||
// cards with an interval ≥ 1 day
|
||||
&& (review.review_kind == RevlogReviewKind::Review
|
||||
|| review.last_interval <= -86400
|
||||
|
|
Loading…
Reference in a new issue