add option filter ab by intersection

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-10-11 16:50:48 +08:00
parent e1dd53f146
commit 1416197b62
39 changed files with 72 additions and 4 deletions

View File

@@ -450,12 +450,21 @@ class AddressBookPeersView extends BasePeersView {
if (selectedTags.isEmpty) {
return true;
}
for (final tag in selectedTags) {
if (idents.contains(tag)) {
return true;
if (gFFI.abModel.filterByIntersection.value) {
for (final tag in selectedTags) {
if (!idents.contains(tag)) {
return false;
}
}
return true;
} else {
for (final tag in selectedTags) {
if (idents.contains(tag)) {
return true;
}
}
return false;
}
return false;
}
}