Add sidebar filter "first review today"
This commit is contained in:
parent
e274ff26ab
commit
3cecc7157b
@ -146,6 +146,7 @@ browsing-studied-today = Studied
|
||||
browsing-added-today = Added
|
||||
browsing-again-today = Again
|
||||
browsing-edited-today = Edited
|
||||
browsing-sidebar-first-review = First Review
|
||||
browsing-sidebar-due-today = Due
|
||||
browsing-sidebar-untagged = Untagged
|
||||
browsing-sidebar-overdue = Overdue
|
||||
|
@ -513,6 +513,12 @@ class SidebarTreeView(QTreeView):
|
||||
type=type,
|
||||
search_node=SearchNode(rated=SearchNode.Rated(days=1)),
|
||||
)
|
||||
root.add_simple(
|
||||
name=tr.browsing_sidebar_first_review(),
|
||||
icon=icon,
|
||||
type=type,
|
||||
search_node=SearchNode(introduced_in_days=1),
|
||||
)
|
||||
root.add_simple(
|
||||
name=tr.browsing_again_today(),
|
||||
icon=icon,
|
||||
|
@ -872,6 +872,7 @@ message SearchNode {
|
||||
int32 due_on_day = 16;
|
||||
string tag = 17;
|
||||
string note = 18;
|
||||
uint32 introduced_in_days = 19;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,7 @@ impl TryFrom<pb::SearchNode> for Node {
|
||||
ease: rated.rating().into(),
|
||||
}),
|
||||
Filter::AddedInDays(u) => Node::Search(SearchNode::AddedInDays(u)),
|
||||
Filter::IntroducedInDays(u) => Node::Search(SearchNode::IntroducedInDays(u)),
|
||||
Filter::DueInDays(i) => Node::Search(SearchNode::Property {
|
||||
operator: "<=".to_string(),
|
||||
kind: PropertyKind::Due(i),
|
||||
|
Loading…
Reference in New Issue
Block a user