From dce50cddca51100f20b5bdbc060894f817b4afd2 Mon Sep 17 00:00:00 2001 From: Woit Date: Thu, 28 Nov 2024 16:50:59 +0100 Subject: [PATCH] wip --- .../Conversation/ConversationMessageContainer.swift | 9 +++++---- Monal/another.im/XMPP/MonalWrapperModels.swift | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Monal/another.im/Views/Conversation/ConversationMessageContainer.swift b/Monal/another.im/Views/Conversation/ConversationMessageContainer.swift index d67eb06..7fdfed8 100644 --- a/Monal/another.im/Views/Conversation/ConversationMessageContainer.swift +++ b/Monal/another.im/Views/Conversation/ConversationMessageContainer.swift @@ -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) // } } } diff --git a/Monal/another.im/XMPP/MonalWrapperModels.swift b/Monal/another.im/XMPP/MonalWrapperModels.swift index 6f448bd..c77d95f 100644 --- a/Monal/another.im/XMPP/MonalWrapperModels.swift +++ b/Monal/another.im/XMPP/MonalWrapperModels.swift @@ -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 } }