mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
support sorting on tags
I don't personally understand it, but some users seem to want it.
This commit is contained in:
parent
00d0447ecb
commit
09a76967e7
2 changed files with 2 additions and 0 deletions
|
@ -42,6 +42,7 @@ pub enum SortKind {
|
|||
NoteField,
|
||||
#[serde(rename = "note")]
|
||||
NoteType,
|
||||
NoteTags,
|
||||
CardMod,
|
||||
CardReps,
|
||||
CardDue,
|
||||
|
|
|
@ -51,6 +51,7 @@ fn write_order(sql: &mut String, kind: &SortKind, reverse: bool) -> Result<()> {
|
|||
}
|
||||
SortKind::CardLapses => "c.lapses",
|
||||
SortKind::CardInterval => "c.ivl",
|
||||
SortKind::NoteTags => "n.tags",
|
||||
SortKind::CardDeck => "(select v from sort_order where k = c.did)",
|
||||
SortKind::NoteType => "(select v from sort_order where k = n.mid)",
|
||||
SortKind::CardTemplate => "(select v from sort_order where k1 = n.mid and k2 = c.ord)",
|
||||
|
|
Loading…
Reference in a new issue