From 1e6cbcf06f2c19c7fa8a23f13b7329ecc500b3b2 Mon Sep 17 00:00:00 2001 From: Mathew Kamkar <578302+matkam@users.noreply.github.com> Date: Sat, 5 Jul 2025 10:49:10 -0700 Subject: [PATCH] fix crash --- Meshtastic/Views/Messages/UserList.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Meshtastic/Views/Messages/UserList.swift b/Meshtastic/Views/Messages/UserList.swift index bd93b495..0798ffbf 100644 --- a/Meshtastic/Views/Messages/UserList.swift +++ b/Meshtastic/Views/Messages/UserList.swift @@ -337,8 +337,8 @@ struct FilteredUserList: View { } } // Always apply unmessagable and connected node filters - // Only hide unmessagable nodes if they have 0 messages - let isUnmessagablePredicate = NSPredicate(format: "unmessagable == NO AND (SUBQUERY(messageList, $msg, $msg.messageId != nil).@count == 0)") + // Show unmessagable nodes only if they have messages, otherwise hide them + let isUnmessagablePredicate = NSPredicate(format: "unmessagable == NO OR ((SUBQUERY(receivedMessages, $msg, $msg.messageId != nil).@count > 0) OR (SUBQUERY(sentMessages, $msg, $msg.messageId != nil).@count > 0))") predicates.append(isUnmessagablePredicate) let isIgnoredPredicate = NSPredicate(format: "userNode.ignored == NO") predicates.append(isIgnoredPredicate)