mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
add separate sched/user bury searches, and fix bury enums
This commit is contained in:
parent
e4fa549af2
commit
ac6397ae9e
3 changed files with 10 additions and 2 deletions
|
@ -45,8 +45,8 @@ pub enum CardQueue {
|
|||
PreviewRepeat = 4,
|
||||
/// cards are not due in these states
|
||||
Suspended = -1,
|
||||
UserBuried = -2,
|
||||
SchedBuried = -3,
|
||||
SchedBuried = -2,
|
||||
UserBuried = -3,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
|
|
|
@ -105,6 +105,8 @@ pub(super) enum StateKind {
|
|||
Learning,
|
||||
Due,
|
||||
Buried,
|
||||
UserBuried,
|
||||
SchedBuried,
|
||||
Suspended,
|
||||
}
|
||||
|
||||
|
@ -317,6 +319,8 @@ fn parse_state(s: &str) -> ParseResult<SearchNode<'static>> {
|
|||
"learn" => Learning,
|
||||
"due" => Due,
|
||||
"buried" => Buried,
|
||||
"buried-manually" => UserBuried,
|
||||
"buried-sibling" => SchedBuried,
|
||||
"suspended" => Suspended,
|
||||
_ => return Err(ParseError {}),
|
||||
}))
|
||||
|
|
|
@ -289,6 +289,10 @@ impl SqlWriter<'_> {
|
|||
lrn = CardQueue::Learn as i8,
|
||||
daycutoff = timing.next_day_at,
|
||||
),
|
||||
StateKind::UserBuried => write!(self.sql, "c.queue = {}", CardQueue::UserBuried as i8),
|
||||
StateKind::SchedBuried => {
|
||||
write!(self.sql, "c.queue = {}", CardQueue::SchedBuried as i8)
|
||||
}
|
||||
}
|
||||
.unwrap();
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue