fix interday learning cards not being buried
https://forums.ankiweb.net/t/2-1-49-mac-automatic-unbury-still-not-working/14799/43
This commit is contained in:
parent
df0ad4be4b
commit
8ed1fa7e99
@ -396,16 +396,19 @@ impl super::SqliteStorage {
|
|||||||
include_reviews: bool,
|
include_reviews: bool,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
self.setup_searched_cards_table()?;
|
self.setup_searched_cards_table()?;
|
||||||
|
let params = named_params! {
|
||||||
|
":card_id": cid,
|
||||||
|
":note_id": nid,
|
||||||
|
":include_new": include_new,
|
||||||
|
":include_reviews": include_reviews,
|
||||||
|
":new_queue": CardQueue::New as i8,
|
||||||
|
":review_queue": CardQueue::Review as i8,
|
||||||
|
":daylearn_queue": CardQueue::DayLearn as i8,
|
||||||
|
}
|
||||||
|
.to_vec();
|
||||||
self.db
|
self.db
|
||||||
.prepare_cached(include_str!("siblings_for_bury.sql"))?
|
.prepare_cached(include_str!("siblings_for_bury.sql"))?
|
||||||
.execute(params![
|
.execute(&*params)?;
|
||||||
cid,
|
|
||||||
nid,
|
|
||||||
include_new,
|
|
||||||
CardQueue::New as i8,
|
|
||||||
include_reviews,
|
|
||||||
CardQueue::Review as i8
|
|
||||||
])?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
INSERT INTO search_cids
|
INSERT INTO search_cids
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM cards
|
FROM cards
|
||||||
WHERE id != ?
|
WHERE id != :card_id
|
||||||
AND nid = ?
|
AND nid = :note_id
|
||||||
AND (
|
AND (
|
||||||
(
|
(
|
||||||
?
|
:include_new
|
||||||
AND queue = ?
|
AND queue = :new_queue
|
||||||
)
|
)
|
||||||
OR (
|
OR (
|
||||||
?
|
:include_reviews
|
||||||
AND queue = ?
|
AND queue in (:review_queue, :daylearn_queue)
|
||||||
)
|
)
|
||||||
);
|
);
|
Loading…
Reference in New Issue
Block a user