mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Show Encryption Authenticity warnings on messages in the timeline. (#3051)
* Initial implementation. * Add developer option for showing timeline item authenticity. * Refactor code to use new SendInfo.Status. --------- Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
+7
-3
@@ -50,7 +50,11 @@ extension EventBasedTimelineItemProtocol {
|
||||
var pollIfAvailable: Poll? {
|
||||
(self as? PollRoomTimelineItem)?.poll
|
||||
}
|
||||
|
||||
|
||||
var hasStatusIcon: Bool {
|
||||
hasFailedToSend || properties.encryptionAuthenticity != nil
|
||||
}
|
||||
|
||||
var hasFailedToSend: Bool {
|
||||
properties.deliveryStatus == .sendingFailed
|
||||
}
|
||||
@@ -74,8 +78,8 @@ extension EventBasedTimelineItemProtocol {
|
||||
whiteSpaces += 1
|
||||
}
|
||||
|
||||
// To account for the extra spacing created by the alert icon
|
||||
if hasFailedToSend {
|
||||
// To account for the extra spacing created by the status icon
|
||||
if hasStatusIcon {
|
||||
whiteSpaces += 3
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user