Skip to content

Commit 6c68921

Browse files
committed
fix issues introduced with cherry-pick
1 parent 87c6686 commit 6c68921

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

rslib/src/card.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ impl Card {
152152
pub(crate) fn restore_queue_after_bury_or_suspend(&mut self) {
153153
self.queue = match self.ctype {
154154
CardType::Learn | CardType::Relearn => {
155-
let original_due = if self.odue > 0 { self.odue } else { self.due };
155+
let original_due = if self.original_due > 0 {
156+
self.original_due
157+
} else {
158+
self.due
159+
};
156160
if original_due > 1_000_000_000 {
157161
// previous interval was in seconds
158162
CardQueue::Learn

rslib/src/storage/card/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use crate::{
55
card::{Card, CardID, CardQueue, CardType},
66
deckconf::DeckConfID,
7-
decks::{Deck, DeckID, DeckKind},
7+
decks::{DeckID, DeckKind},
88
err::Result,
99
notes::NoteID,
1010
timestamp::{TimestampMillis, TimestampSecs},
@@ -281,7 +281,6 @@ impl super::SqliteStorage {
281281
Ok(())
282282
}
283283

284-
285284
/// Fix cards with low eases due to schema 15 bug.
286285
/// Deck configs were defaulting to 2.5% ease, which was capped to
287286
/// 130% when the deck options were edited for the first time.
@@ -313,7 +312,6 @@ impl super::SqliteStorage {
313312

314313
Ok(())
315314
}
316-
317315
}
318316

319317
#[cfg(test)]

0 commit comments

Comments
 (0)