mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
sort empty cards by notetype name
This commit is contained in:
parent
b476d071e7
commit
8b0121b0ac
1 changed files with 6 additions and 2 deletions
|
@ -56,9 +56,13 @@ impl Collection {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn empty_cards(&mut self) -> Result<Vec<(NoteTypeID, Vec<EmptyCardsForNote>)>> {
|
pub fn empty_cards(&mut self) -> Result<Vec<(NoteTypeID, Vec<EmptyCardsForNote>)>> {
|
||||||
self.get_all_notetypes()?
|
self.storage
|
||||||
|
.get_all_notetype_names()?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(id, nt)| self.empty_cards_for_notetype(&nt).map(|v| (id, v)))
|
.map(|(id, _name)| {
|
||||||
|
let nt = self.get_notetype(id)?.unwrap();
|
||||||
|
self.empty_cards_for_notetype(&nt).map(|v| (id, v))
|
||||||
|
})
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue