mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Render the number of thread replies on the thread summary timeline view.
This commit is contained in:
committed by
Stefan Ceriu
parent
f66d654820
commit
5315f962c6
@@ -21,6 +21,7 @@ enum EncryptionAuthenticity: Hashable {
|
||||
case unverifiedIdentity(color: Color)
|
||||
case verificationViolation(color: Color)
|
||||
case sentInClear(color: Color)
|
||||
case mismatchedSender(color: Color)
|
||||
|
||||
var message: String {
|
||||
switch self {
|
||||
@@ -36,6 +37,8 @@ enum EncryptionAuthenticity: Hashable {
|
||||
L10n.eventShieldReasonPreviouslyVerified
|
||||
case .sentInClear:
|
||||
L10n.eventShieldReasonSentInClear
|
||||
case .mismatchedSender:
|
||||
L10n.eventShieldMismatchedSender
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +49,8 @@ enum EncryptionAuthenticity: Hashable {
|
||||
.unsignedDevice(let color),
|
||||
.unverifiedIdentity(let color),
|
||||
.verificationViolation(let color),
|
||||
.sentInClear(let color):
|
||||
.sentInClear(let color),
|
||||
.mismatchedSender(let color):
|
||||
color
|
||||
}
|
||||
}
|
||||
@@ -54,7 +58,7 @@ enum EncryptionAuthenticity: Hashable {
|
||||
var icon: KeyPath<CompoundIcons, Image> {
|
||||
switch self {
|
||||
case .notGuaranteed: \.info
|
||||
case .unknownDevice, .unsignedDevice, .unverifiedIdentity, .verificationViolation: \.helpSolid
|
||||
case .unknownDevice, .unsignedDevice, .unverifiedIdentity, .verificationViolation, .mismatchedSender: \.helpSolid
|
||||
case .sentInClear: \.lockOff
|
||||
}
|
||||
}
|
||||
@@ -86,6 +90,8 @@ extension EncryptionAuthenticity {
|
||||
self = .verificationViolation(color: color)
|
||||
case .sentInClear:
|
||||
self = .sentInClear(color: color)
|
||||
case .mismatchedSender:
|
||||
self = .mismatchedSender(color: color)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,6 +10,6 @@ import MatrixRustSDK
|
||||
enum TimelineItemThreadSummary: Hashable {
|
||||
case notLoaded
|
||||
case loading
|
||||
case loaded(senderID: String, sender: TimelineItemSender, latestEventContent: TimelineEventContent)
|
||||
case loaded(senderID: String, sender: TimelineItemSender, latestEventContent: TimelineEventContent, numberOfReplies: Int)
|
||||
case error(message: String)
|
||||
}
|
||||
|
||||
@@ -699,7 +699,8 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
|
||||
return .loaded(senderID: senderID,
|
||||
sender: sender,
|
||||
latestEventContent: latestEventContent)
|
||||
latestEventContent: latestEventContent,
|
||||
numberOfReplies: Int(threadSummary.numReplies()))
|
||||
|
||||
case .error(let message):
|
||||
return .error(message: message)
|
||||
|
||||
Reference in New Issue
Block a user