fix issues introduced with cherry-pick

This commit is contained in:
Damien Elmes 2020-09-22 09:01:52 +10:00
parent 87c6686930
commit 6c68921f18
2 changed files with 6 additions and 4 deletions

View file

@ -152,7 +152,11 @@ impl Card {
pub(crate) fn restore_queue_after_bury_or_suspend(&mut self) {
self.queue = match self.ctype {
CardType::Learn | CardType::Relearn => {
let original_due = if self.odue > 0 { self.odue } else { self.due };
let original_due = if self.original_due > 0 {
self.original_due
} else {
self.due
};
if original_due > 1_000_000_000 {
// previous interval was in seconds
CardQueue::Learn

View file

@ -4,7 +4,7 @@
use crate::{
card::{Card, CardID, CardQueue, CardType},
deckconf::DeckConfID,
decks::{Deck, DeckID, DeckKind},
decks::{DeckID, DeckKind},
err::Result,
notes::NoteID,
timestamp::{TimestampMillis, TimestampSecs},
@ -281,7 +281,6 @@ impl super::SqliteStorage {
Ok(())
}
/// Fix cards with low eases due to schema 15 bug.
/// Deck configs were defaulting to 2.5% ease, which was capped to
/// 130% when the deck options were edited for the first time.
@ -313,7 +312,6 @@ impl super::SqliteStorage {
Ok(())
}
}
#[cfg(test)]