diff --git a/apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift b/apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift index 9840b22fc8..32249506d3 100644 --- a/apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift +++ b/apps/ios/Shared/Views/Chat/ChatItem/CIMetaView.swift @@ -75,9 +75,14 @@ enum MetaColorMode { } } - var statusSpacer: Text { + func statusSpacer(_ sent: Bool) -> Text { switch self { - case .normal, .transparent: Text(Image(systemName: "circlebadge.fill")).foregroundColor(.clear) + case .normal, .transparent: + Text( + sent + ? Image("checkmark.wide") + : Image(systemName: "circlebadge.fill") + ).foregroundColor(.clear) case .invertedMaterial: Text(" ").kerning(13) } } @@ -130,10 +135,10 @@ func ciMetaText( colorMode.resolve(statusColor) } r = r + colored(Text(image), metaColor) - space = Text(" ") } else if !meta.disappearing { - space = colorMode.statusSpacer + Text(" ") + r = r + colorMode.statusSpacer(meta.itemStatus.sent) } + space = Text(" ") } if let enc = encrypted { appendSpace() diff --git a/apps/ios/SimpleXChat/ChatTypes.swift b/apps/ios/SimpleXChat/ChatTypes.swift index 0777503650..6e687538c0 100644 --- a/apps/ios/SimpleXChat/ChatTypes.swift +++ b/apps/ios/SimpleXChat/ChatTypes.swift @@ -2820,6 +2820,20 @@ public enum CIStatus: Decodable, Hashable { case .invalid: return "invalid" } } + + public var sent: Bool { + switch self { + case .sndNew: true + case .sndSent: true + case .sndRcvd: true + case .sndErrorAuth: true + case .sndError: true + case .sndWarning: true + case .rcvNew: false + case .rcvRead: false + case .invalid: false + } + } public func statusIcon(_ metaColor: Color, _ paleMetaColor: Color, _ primaryColor: Color = .accentColor) -> (Image, Color)? { switch self {