mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Periphery cleanup (#5893)
This commit is contained in:
@@ -8,5 +8,4 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
// periphery: ignore - markdown protocol
|
||||
nonisolated protocol DecorationTimelineItemProtocol: RoomTimelineItemProtocol { }
|
||||
|
||||
+1
@@ -11,6 +11,7 @@ import UIKit
|
||||
nonisolated struct EmoteRoomTimelineItemContent: Hashable {
|
||||
let body: String
|
||||
var formattedBody: AttributedString?
|
||||
// periphery:ignore - used via the synthesized Hashable conformance
|
||||
/// The original textual representation of the formatted body directly from the event (usually HTML code)
|
||||
var formattedBodyHTMLString: String?
|
||||
}
|
||||
|
||||
-3
@@ -11,9 +11,6 @@ import Foundation
|
||||
nonisolated struct CallNotificationRoomTimelineItem: RoomTimelineItemProtocol, Equatable {
|
||||
let id: TimelineItemIdentifier
|
||||
let timestamp: Date
|
||||
let isEditable: Bool
|
||||
let canBeRepliedTo: Bool
|
||||
|
||||
let isDM: Bool
|
||||
let isDeclinedByMe: Bool
|
||||
let isDeclined: Bool
|
||||
|
||||
+1
@@ -25,6 +25,7 @@ nonisolated struct Poll: Hashable {
|
||||
let kind: Kind
|
||||
let maxSelections: Int
|
||||
let options: [Option]
|
||||
// periphery:ignore - used via the synthesized Hashable conformance
|
||||
let votes: [String: [String]]
|
||||
let endDate: Date?
|
||||
/// Whether the poll has been created by the account owner
|
||||
|
||||
@@ -857,8 +857,6 @@ nonisolated struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
let isVoiceCall = callIntent == CallIntent.audio.rawValue
|
||||
return CallNotificationRoomTimelineItem(id: eventItemProxy.id,
|
||||
timestamp: eventItemProxy.timestamp,
|
||||
isEditable: eventItemProxy.isEditable,
|
||||
canBeRepliedTo: eventItemProxy.canBeRepliedTo,
|
||||
isDM: isDM,
|
||||
isDeclinedByMe: declinedBy.contains(userID),
|
||||
isDeclined: !declinedBy.isEmpty,
|
||||
|
||||
@@ -48,10 +48,10 @@ struct RoomTimelineItemView: View {
|
||||
RedactedRoomTimelineView(timelineItem: item)
|
||||
case .encrypted(let item):
|
||||
EncryptedRoomTimelineView(timelineItem: item)
|
||||
case .readMarker(let item):
|
||||
ReadMarkerRoomTimelineView(timelineItem: item)
|
||||
case .paginationIndicator(let item):
|
||||
PaginationIndicatorRoomTimelineView(timelineItem: item)
|
||||
case .readMarker:
|
||||
ReadMarkerRoomTimelineView()
|
||||
case .paginationIndicator:
|
||||
PaginationIndicatorRoomTimelineView()
|
||||
case .sticker(let item):
|
||||
StickerRoomTimelineView(timelineItem: item)
|
||||
case .unsupported(let item):
|
||||
@@ -71,8 +71,8 @@ struct RoomTimelineItemView: View {
|
||||
title: L10n.commonVoiceMessage,
|
||||
duration: 0)
|
||||
VoiceMessageRoomTimelineView(timelineItem: item, playerState: playerState)
|
||||
case .callInvite(let item):
|
||||
CallInviteRoomTimelineView(timelineItem: item)
|
||||
case .callInvite:
|
||||
CallInviteRoomTimelineView()
|
||||
case .callNotification(let item):
|
||||
CallNotificationRoomTimelineView(timelineItem: item)
|
||||
case .liveLocation(let item):
|
||||
@@ -86,7 +86,7 @@ struct RoomTimelineItemView: View {
|
||||
if let item = context?.viewState.linkMetadataProvider?.metadataItems[url] {
|
||||
linkMetadata[url] = item
|
||||
} else {
|
||||
linkMetadata[url] = LinkMetadataProviderItem(url: url, metadata: nil)
|
||||
linkMetadata[url] = LinkMetadataProviderItem(metadata: nil)
|
||||
}
|
||||
}
|
||||
return linkMetadata
|
||||
|
||||
Reference in New Issue
Block a user