mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Search for Learn and PreviewRepeat cards when using prop:due
This commit is contained in:
parent
795dcab370
commit
155a59b80b
1 changed files with 10 additions and 2 deletions
|
@ -235,16 +235,24 @@ impl SqlWriter<'_> {
|
||||||
|
|
||||||
fn write_prop(&mut self, op: &str, kind: &PropertyKind) -> Result<()> {
|
fn write_prop(&mut self, op: &str, kind: &PropertyKind) -> Result<()> {
|
||||||
let timing = self.col.timing_today()?;
|
let timing = self.col.timing_today()?;
|
||||||
|
|
||||||
match kind {
|
match kind {
|
||||||
PropertyKind::Due(days) => {
|
PropertyKind::Due(days) => {
|
||||||
let day = days + (timing.days_elapsed as i32);
|
let day = days + (timing.days_elapsed as i32);
|
||||||
write!(
|
write!(
|
||||||
self.sql,
|
self.sql,
|
||||||
"(c.queue in ({rev},{daylrn}) and due {op} {day})",
|
"(
|
||||||
|
(c.queue in ({rev},{daylrn}) and c.due {op} {day}) or
|
||||||
|
(c.queue in ({lrn},{previewrepeat}) and ((c.due - {cutoff}) / 86400) {op} {days})
|
||||||
|
)",
|
||||||
rev = CardQueue::Review as u8,
|
rev = CardQueue::Review as u8,
|
||||||
daylrn = CardQueue::DayLearn as u8,
|
daylrn = CardQueue::DayLearn as u8,
|
||||||
op = op,
|
op = op,
|
||||||
day = day
|
day = day,
|
||||||
|
lrn = CardQueue::Learn as i8,
|
||||||
|
previewrepeat = CardQueue::PreviewRepeat as i8,
|
||||||
|
cutoff = timing.next_day_at,
|
||||||
|
days = days
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
PropertyKind::Position(pos) => {
|
PropertyKind::Position(pos) => {
|
||||||
|
|
Loading…
Reference in a new issue