mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
make sure we don't invoke second search in v1 scheduler
This commit is contained in:
parent
e73359510d
commit
afc8680f2a
1 changed files with 6 additions and 1 deletions
|
@ -100,7 +100,12 @@ impl Collection {
|
|||
fn build_filtered_deck(&mut self, ctx: DeckFilterContext) -> Result<usize> {
|
||||
let start = -100_000;
|
||||
let mut position = start;
|
||||
for term in &ctx.config.search_terms {
|
||||
let limit = if ctx.scheduler == SchedulerVersion::V1 {
|
||||
1
|
||||
} else {
|
||||
2
|
||||
};
|
||||
for term in ctx.config.search_terms.iter().take(limit) {
|
||||
position = self.move_cards_matching_term(&ctx, term, position)?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue