mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Icons for each messge type
This commit is contained in:
parent
8dc4f3076d
commit
e633009e9d
1 changed files with 12 additions and 3 deletions
|
|
@ -28,6 +28,7 @@ struct UserList: View {
|
|||
@State private var roleFilter = false
|
||||
@State private var deviceRoles: Set<Int> = []
|
||||
@State var isEditingFilters = false
|
||||
@State private var showingTrustConfirm: Bool = false
|
||||
|
||||
@FetchRequest(
|
||||
sortDescriptors: [NSSortDescriptor(key: "lastMessage", ascending: false),
|
||||
|
|
@ -71,8 +72,17 @@ struct UserList: View {
|
|||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
if user.pkiEncrypted {
|
||||
Image(systemName: "lock.fill")
|
||||
.foregroundColor(.green)
|
||||
if mostRecent == nil || user.publicKey == mostRecent?.publicKey {
|
||||
Image(systemName: "lock.fill")
|
||||
.foregroundColor(.green)
|
||||
} else {
|
||||
/// Public Key on the User and the Public Key on the Last Message don't match
|
||||
Image(systemName: "lock.slash.fill")
|
||||
.foregroundColor(.red)
|
||||
}
|
||||
} else {
|
||||
Image(systemName: "lock.open.fill")
|
||||
.foregroundColor(.yellow)
|
||||
}
|
||||
Text(user.longName ?? "unknown".localized)
|
||||
.font(.headline)
|
||||
|
|
@ -245,7 +255,6 @@ struct UserList: View {
|
|||
let searchPredicates = ["userId", "numString", "hwModel", "hwDisplayName", "longName", "shortName"].map { property in
|
||||
return NSPredicate(format: "%K CONTAINS[c] %@", property, searchText)
|
||||
}
|
||||
|
||||
/// Create a compound predicate using each text search preicate as an OR
|
||||
let textSearchPredicate = NSCompoundPredicate(type: .or, subpredicates: searchPredicates)
|
||||
/// Create an array of predicates to hold our AND predicates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue