mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Dont be dumb
This commit is contained in:
parent
01770ec2b0
commit
084da97da6
1 changed files with 3 additions and 1 deletions
|
|
@ -344,9 +344,11 @@ struct FilteredUserList<Content: View>: View {
|
|||
predicates.append(distancePredicate)
|
||||
}
|
||||
}
|
||||
// Always apply unmessagable filter
|
||||
// Always apply unmessagable and connected node filters
|
||||
let isUnmessagablePredicate = NSPredicate(format: "unmessagable == NO")
|
||||
predicates.append(isUnmessagablePredicate)
|
||||
let isConnectedNodePredicate = NSPredicate(format: "NOT (numString CONTAINS \(UserDefaults.preferredPeripheralNum))")
|
||||
predicates.append(isConnectedNodePredicate)
|
||||
// Combine all predicates
|
||||
let finalPredicate = predicates.isEmpty ? NSPredicate(value: true) : NSCompoundPredicate(type: .and, subpredicates: predicates)
|
||||
// Initialize the fetch request with the combined predicate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue