Skip to content

Commit

Permalink
fix issues introduced with cherry-pick
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Sep 21, 2020
1 parent 87c6686 commit 6c68921
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 5 additions & 1 deletion rslib/src/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions rslib/src/storage/card/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -313,7 +312,6 @@ impl super::SqliteStorage {

Ok(())
}

}

#[cfg(test)]
Expand Down

0 comments on commit 6c68921

Please sign in to comment.