From 084da97da62ee0fa83c605e462eb2050b17de004 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Tue, 10 Jun 2025 23:12:57 -0700 Subject: [PATCH] Dont be dumb --- Meshtastic/Views/Messages/UserList.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Meshtastic/Views/Messages/UserList.swift b/Meshtastic/Views/Messages/UserList.swift index 09bc8045..37749998 100644 --- a/Meshtastic/Views/Messages/UserList.swift +++ b/Meshtastic/Views/Messages/UserList.swift @@ -344,9 +344,11 @@ struct FilteredUserList: 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