mirror of
https://github.com/ankitects/anki.git
synced 2025-12-30 23:32:57 -05:00
fix issues introduced with cherry-pick
This commit is contained in:
parent
87c6686930
commit
6c68921f18
2 changed files with 6 additions and 4 deletions
|
|
@ -152,7 +152,11 @@ impl Card {
|
||||||
pub(crate) fn restore_queue_after_bury_or_suspend(&mut self) {
|
pub(crate) fn restore_queue_after_bury_or_suspend(&mut self) {
|
||||||
self.queue = match self.ctype {
|
self.queue = match self.ctype {
|
||||||
CardType::Learn | CardType::Relearn => {
|
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 {
|
if original_due > 1_000_000_000 {
|
||||||
// previous interval was in seconds
|
// previous interval was in seconds
|
||||||
CardQueue::Learn
|
CardQueue::Learn
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
card::{Card, CardID, CardQueue, CardType},
|
card::{Card, CardID, CardQueue, CardType},
|
||||||
deckconf::DeckConfID,
|
deckconf::DeckConfID,
|
||||||
decks::{Deck, DeckID, DeckKind},
|
decks::{DeckID, DeckKind},
|
||||||
err::Result,
|
err::Result,
|
||||||
notes::NoteID,
|
notes::NoteID,
|
||||||
timestamp::{TimestampMillis, TimestampSecs},
|
timestamp::{TimestampMillis, TimestampSecs},
|
||||||
|
|
@ -281,7 +281,6 @@ impl super::SqliteStorage {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Fix cards with low eases due to schema 15 bug.
|
/// Fix cards with low eases due to schema 15 bug.
|
||||||
/// Deck configs were defaulting to 2.5% ease, which was capped to
|
/// Deck configs were defaulting to 2.5% ease, which was capped to
|
||||||
/// 130% when the deck options were edited for the first time.
|
/// 130% when the deck options were edited for the first time.
|
||||||
|
|
@ -313,7 +312,6 @@ impl super::SqliteStorage {
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue