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,
|
||||
) -> Result<()> {
|
||||
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
|
||||
.prepare_cached(include_str!("siblings_for_bury.sql"))?
|
||||
.execute(params![
|
||||
cid,
|
||||
nid,
|
||||
include_new,
|
||||
CardQueue::New as i8,
|
||||
include_reviews,
|
||||
CardQueue::Review as i8
|
||||
])?;
|
||||
.execute(&*params)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
INSERT INTO search_cids
|
||||
SELECT id
|
||||
FROM cards
|
||||
WHERE id != ?
|
||||
AND nid = ?
|
||||
WHERE id != :card_id
|
||||
AND nid = :note_id
|
||||
AND (
|
||||
(
|
||||
?
|
||||
AND queue = ?
|
||||
:include_new
|
||||
AND queue = :new_queue
|
||||
)
|
||||
OR (
|
||||
?
|
||||
AND queue = ?
|
||||
:include_reviews
|
||||
AND queue in (:review_queue, :daylearn_queue)
|
||||
)
|
||||
);
|
Loading…
Reference in New Issue
Block a user