Merge pull request #908 from hgiesel/easereset

Reset ease to 0 for after rescheduling cards as new
This commit is contained in:
Damien Elmes 2021-01-09 09:21:22 +10:00 committed by GitHub
commit b3c690aa06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,6 @@
use crate::{
card::{Card, CardID, CardQueue, CardType},
collection::Collection,
deckconf::INITIAL_EASE_FACTOR_THOUSANDS,
decks::DeckID,
err::Result,
notes::NoteID,
@ -21,11 +20,7 @@ impl Card {
self.ctype = CardType::New;
self.queue = CardQueue::New;
self.interval = 0;
if self.ease_factor == 0 {
// unlike the old Python code, we leave the ease factor alone
// if it's already set
self.ease_factor = INITIAL_EASE_FACTOR_THOUSANDS;
}
self.ease_factor = 0;
}
/// If the card is new, change its position.