mirror of
https://github.com/lennart-k/rustical.git
synced 2026-01-30 11:48:18 +00:00
addressbook-query: Fix filter matching for empty filters
This commit is contained in:
@@ -82,6 +82,11 @@ pub struct FilterElement {
|
||||
impl FilterElement {
|
||||
#[must_use]
|
||||
pub fn matches(&self, addr_object: &AddressObject) -> bool {
|
||||
if self.prop_filter.is_empty() {
|
||||
// Filter empty
|
||||
return true;
|
||||
}
|
||||
|
||||
let Allof(allof) = self.test;
|
||||
let mut results = self
|
||||
.prop_filter
|
||||
|
||||
@@ -32,6 +32,10 @@ pub struct PropFilterElement {
|
||||
impl PropFilterElement {
|
||||
#[must_use]
|
||||
pub fn match_property(&self, property: &Property) -> bool {
|
||||
if self.param_filter.is_empty() && self.text_match.is_empty() {
|
||||
// Filter empty
|
||||
return true;
|
||||
}
|
||||
let Allof(allof) = self.test;
|
||||
let text_matches = self
|
||||
.text_match
|
||||
|
||||
Reference in New Issue
Block a user