Add pb message for dupe filter
This commit is contained in:
parent
d9bb20ac24
commit
6d9cfb85ab
@ -775,12 +775,17 @@ message FilterToSearchIn {
|
||||
NO_FLAG = 15;
|
||||
ANY_FLAG = 16;
|
||||
}
|
||||
message DupeIn {
|
||||
NoteTypeID mid = 1;
|
||||
string text = 2;
|
||||
}
|
||||
oneof filter {
|
||||
NamedFilter name = 1;
|
||||
string tag = 2;
|
||||
string deck = 3;
|
||||
string note = 4;
|
||||
uint32 template = 5;
|
||||
DupeIn dupe = 6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -327,6 +327,10 @@ impl From<pb::FilterToSearchIn> for Node<'_> {
|
||||
Filter::Template(u) => {
|
||||
Node::Search(SearchNode::CardTemplate(TemplateKind::Ordinal(u as u16)))
|
||||
}
|
||||
Filter::Dupe(dupe) => Node::Search(SearchNode::Duplicates {
|
||||
note_type_id: dupe.mid.unwrap_or(pb::NoteTypeId { ntid: 0 }).into(),
|
||||
text: dupe.text.into(),
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user