mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
make it easier to negate a search term
This commit is contained in:
parent
67d612926c
commit
843ec29228
2 changed files with 2 additions and 0 deletions
|
@ -824,6 +824,7 @@ message SearchTerm {
|
||||||
CardState card_state = 12;
|
CardState card_state = 12;
|
||||||
IdList nids = 13;
|
IdList nids = 13;
|
||||||
uint32 edited_in_days = 14;
|
uint32 edited_in_days = 14;
|
||||||
|
SearchTerm negated = 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -354,6 +354,7 @@ impl From<pb::SearchTerm> for Node<'_> {
|
||||||
Flag::Green => Node::Search(SearchNode::Flag(3)),
|
Flag::Green => Node::Search(SearchNode::Flag(3)),
|
||||||
Flag::Blue => Node::Search(SearchNode::Flag(4)),
|
Flag::Blue => Node::Search(SearchNode::Flag(4)),
|
||||||
},
|
},
|
||||||
|
Filter::Negated(term) => Node::Not(Box::new((*term).into())),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Node::Search(SearchNode::WholeCollection)
|
Node::Search(SearchNode::WholeCollection)
|
||||||
|
|
Loading…
Reference in a new issue