don't convert from sm2 when ivl = 0 (#2849)

This commit is contained in:
Jarrett Ye 2023-11-26 11:14:31 +08:00 committed by GitHub
parent 046ae539fb
commit 3713c86373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,7 @@ impl Card {
self.memory_state = item
.map(|i| fsrs.memory_state(i.item, i.starting_state))
.or_else(|| {
if self.ctype == CardType::New {
if self.ctype == CardType::New || self.interval == 0 {
None
} else {
// no valid revlog entries; infer state from current card state