mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -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,
|
PreviewRepeat = 4,
|
||||||
/// cards are not due in these states
|
/// cards are not due in these states
|
||||||
Suspended = -1,
|
Suspended = -1,
|
||||||
UserBuried = -2,
|
SchedBuried = -2,
|
||||||
SchedBuried = -3,
|
UserBuried = -3,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
|
|
|
@ -105,6 +105,8 @@ pub(super) enum StateKind {
|
||||||
Learning,
|
Learning,
|
||||||
Due,
|
Due,
|
||||||
Buried,
|
Buried,
|
||||||
|
UserBuried,
|
||||||
|
SchedBuried,
|
||||||
Suspended,
|
Suspended,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,6 +319,8 @@ fn parse_state(s: &str) -> ParseResult<SearchNode<'static>> {
|
||||||
"learn" => Learning,
|
"learn" => Learning,
|
||||||
"due" => Due,
|
"due" => Due,
|
||||||
"buried" => Buried,
|
"buried" => Buried,
|
||||||
|
"buried-manually" => UserBuried,
|
||||||
|
"buried-sibling" => SchedBuried,
|
||||||
"suspended" => Suspended,
|
"suspended" => Suspended,
|
||||||
_ => return Err(ParseError {}),
|
_ => return Err(ParseError {}),
|
||||||
}))
|
}))
|
||||||
|
|
|
@ -289,6 +289,10 @@ impl SqlWriter<'_> {
|
||||||
lrn = CardQueue::Learn as i8,
|
lrn = CardQueue::Learn as i8,
|
||||||
daycutoff = timing.next_day_at,
|
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();
|
.unwrap();
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue