limit initial sort selection to new cards

https://github.com/ankidroid/Anki-Android/issues/8172
This commit is contained in:
Damien Elmes 2021-03-12 14:58:19 +10:00
parent c1316bb65f
commit 3b067c7a66

View file

@ -163,7 +163,7 @@ impl Collection {
/// This creates a transaction - we probably want to split it out /// This creates a transaction - we probably want to split it out
/// in the future if calling it as part of a deck options update. /// in the future if calling it as part of a deck options update.
pub fn sort_deck(&mut self, deck: DeckID, random: bool) -> Result<()> { pub fn sort_deck(&mut self, deck: DeckID, random: bool) -> Result<()> {
let cids = self.search_cards(&format!("did:{}", deck), SortMode::NoOrder)?; let cids = self.search_cards(&format!("did:{} is:new", deck), SortMode::NoOrder)?;
let order = if random { let order = if random {
NewCardSortOrder::Random NewCardSortOrder::Random
} else { } else {