mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
fix is:new/is:review
This commit is contained in:
parent
79697746a4
commit
d94effcdc7
1 changed files with 6 additions and 2 deletions
|
@ -152,8 +152,8 @@ impl SqlWriter<'_, '_> {
|
|||
fn write_state(&mut self, state: &StateKind) -> Result<()> {
|
||||
let timing = self.req.storage.timing_today()?;
|
||||
match state {
|
||||
StateKind::New => write!(self.sql, "c.queue = {}", CardQueue::New as i8),
|
||||
StateKind::Review => write!(self.sql, "c.queue = {}", CardQueue::Review as i8),
|
||||
StateKind::New => write!(self.sql, "c.type = {}", CardQueue::New as i8),
|
||||
StateKind::Review => write!(self.sql, "c.type = {}", CardQueue::Review as i8),
|
||||
StateKind::Learning => write!(
|
||||
self.sql,
|
||||
"c.queue in ({},{})",
|
||||
|
@ -490,6 +490,10 @@ mod test {
|
|||
s(ctx, "is:suspended").0,
|
||||
format!("(c.queue = {})", CardQueue::Suspended as i8)
|
||||
);
|
||||
assert_eq!(
|
||||
s(ctx, "is:new").0,
|
||||
format!("(c.type = {})", CardQueue::New as i8)
|
||||
);
|
||||
|
||||
// rated
|
||||
assert_eq!(
|
||||
|
|
Loading…
Reference in a new issue