mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
stop is:due gathering learning cards that are not due yet
https://forums.ankiweb.net/t/how-to-avoid-rebuilding-filtered-decks-to-skip-learning-cards-steps/3551/
This commit is contained in:
parent
fe36fa5fd9
commit
d74cc2e9b0
1 changed files with 3 additions and 2 deletions
|
@ -11,6 +11,7 @@ use crate::{
|
||||||
notetype::NoteTypeID,
|
notetype::NoteTypeID,
|
||||||
text::{matches_wildcard, text_to_re},
|
text::{matches_wildcard, text_to_re},
|
||||||
text::{normalize_to_nfc, strip_html_preserving_image_filenames, without_combining},
|
text::{normalize_to_nfc, strip_html_preserving_image_filenames, without_combining},
|
||||||
|
timestamp::TimestampSecs,
|
||||||
};
|
};
|
||||||
use std::{borrow::Cow, fmt::Write};
|
use std::{borrow::Cow, fmt::Write};
|
||||||
|
|
||||||
|
@ -284,13 +285,13 @@ impl SqlWriter<'_> {
|
||||||
self.sql,
|
self.sql,
|
||||||
"(
|
"(
|
||||||
(c.queue in ({rev},{daylrn}) and c.due <= {today}) or
|
(c.queue in ({rev},{daylrn}) and c.due <= {today}) or
|
||||||
(c.queue = {lrn} and c.due <= {daycutoff})
|
(c.queue = {lrn} and c.due <= {learncutoff})
|
||||||
)",
|
)",
|
||||||
rev = CardQueue::Review as i8,
|
rev = CardQueue::Review as i8,
|
||||||
daylrn = CardQueue::DayLearn as i8,
|
daylrn = CardQueue::DayLearn as i8,
|
||||||
today = timing.days_elapsed,
|
today = timing.days_elapsed,
|
||||||
lrn = CardQueue::Learn as i8,
|
lrn = CardQueue::Learn as i8,
|
||||||
daycutoff = timing.next_day_at,
|
learncutoff = TimestampSecs::now().0 + (self.col.learn_ahead_secs() as i64),
|
||||||
),
|
),
|
||||||
StateKind::UserBuried => write!(self.sql, "c.queue = {}", CardQueue::UserBuried as i8),
|
StateKind::UserBuried => write!(self.sql, "c.queue = {}", CardQueue::UserBuried as i8),
|
||||||
StateKind::SchedBuried => {
|
StateKind::SchedBuried => {
|
||||||
|
|
Loading…
Reference in a new issue