This commit is contained in:
Woit 2024-11-28 16:50:59 +01:00
parent 515ed2197e
commit dce50cddca
2 changed files with 7 additions and 4 deletions

View file

@ -39,6 +39,11 @@ struct MessageAttr: View {
.font(.sub2)
.foregroundColor(.Material.Shape.separator)
Spacer()
if message.encrypted {
Image(systemName: "lock")
.font(.body3)
.foregroundColor(.Material.Shape.separator)
}
// message state commented for now
// if message.status == .error {
@ -49,10 +54,6 @@ struct MessageAttr: View {
// Image(systemName: "clock")
// .font(.body3)
// .foregroundColor(.Material.Shape.separator)
// } else if message.secure {
// Image(systemName: "lock")
// .font(.body3)
// .foregroundColor(.Material.Shape.separator)
// }
}
}

View file

@ -90,6 +90,7 @@ struct Message: Identifiable {
let timestamp: Date
let body: String
let isInbound: Bool
let encrypted: Bool
var id: String {
"\(accountId)|\(dbId)"
@ -104,5 +105,6 @@ struct Message: Identifiable {
timestamp = obj.timestamp
body = obj.messageText
isInbound = obj.inbound
encrypted = obj.encrypted
}
}