fix learning cutoff not updating during review

This commit is contained in:
Damien Elmes 2021-08-02 14:59:05 +10:00
parent 141a96e221
commit 94c7c3282b

View File

@ -40,7 +40,7 @@ impl CardQueues {
learning_count: self.counts.learning, learning_count: self.counts.learning,
learning_cutoff: self.current_learning_cutoff, learning_cutoff: self.current_learning_cutoff,
}; };
let cutoff = self.current_learning_cutoff; self.current_learning_cutoff = TimestampSecs::now();
let ahead_cutoff = self.current_learn_ahead_cutoff(); let ahead_cutoff = self.current_learn_ahead_cutoff();
let new_learning_cards = self let new_learning_cards = self
.intraday_learning .intraday_learning
@ -49,7 +49,6 @@ impl CardQueues {
.take_while(|e| e.due <= ahead_cutoff) .take_while(|e| e.due <= ahead_cutoff)
.count(); .count();
self.counts.learning += new_learning_cards; self.counts.learning += new_learning_cards;
self.current_learning_cutoff = cutoff;
Box::new(change) Box::new(change)
} }