only hide unmonitored nodes when no messages

This commit is contained in:
Mathew Kamkar 2025-07-05 08:22:24 -07:00
parent 9fd6f72b0f
commit b877aafc3f

View file

@ -337,7 +337,8 @@ struct FilteredUserList<Content: View>: View {
}
}
// Always apply unmessagable and connected node filters
let isUnmessagablePredicate = NSPredicate(format: "unmessagable == NO")
// Only hide unmessagable nodes if they have 0 messages
let isUnmessagablePredicate = NSPredicate(format: "unmessagable == NO AND (SUBQUERY(messageList, $msg, $msg.messageId != nil).@count == 0)")
predicates.append(isUnmessagablePredicate)
let isIgnoredPredicate = NSPredicate(format: "userNode.ignored == NO")
predicates.append(isIgnoredPredicate)