mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 00:49:44 +00:00
Removing dead code part 2 (#2235)
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
+1
-12
@@ -18,23 +18,12 @@ struct LocationRoomTimelineItemContent: Hashable {
|
||||
let body: String
|
||||
let geoURI: GeoURI?
|
||||
let description: String?
|
||||
let zoomLevel: UInt8?
|
||||
let asset: AssetType?
|
||||
|
||||
enum AssetType {
|
||||
case sender
|
||||
case pin
|
||||
}
|
||||
|
||||
init(body: String,
|
||||
geoURI: GeoURI? = nil,
|
||||
description: String? = nil,
|
||||
zoomLevel: UInt8? = nil,
|
||||
asset: AssetType? = nil) {
|
||||
description: String? = nil) {
|
||||
self.body = body
|
||||
self.geoURI = geoURI
|
||||
self.description = description
|
||||
self.zoomLevel = zoomLevel
|
||||
self.asset = asset
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ struct RoomStateEventStringBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
func buildString(for state: OtherState, stateKey: String?, sender: TimelineItemSender, isOutgoing: Bool) -> String? {
|
||||
func buildString(for state: OtherState, sender: TimelineItemSender, isOutgoing: Bool) -> String? {
|
||||
let senderName = sender.displayName ?? sender.id
|
||||
|
||||
switch state {
|
||||
|
||||
@@ -526,9 +526,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
private func buildLocationTimelineItemContent(_ locationContent: LocationContent) -> LocationRoomTimelineItemContent {
|
||||
LocationRoomTimelineItemContent(body: locationContent.body,
|
||||
geoURI: .init(string: locationContent.geoUri),
|
||||
description: locationContent.description,
|
||||
zoomLevel: locationContent.zoomLevel,
|
||||
asset: locationContent.asset.map { .init(assetType: $0) })
|
||||
description: locationContent.description)
|
||||
}
|
||||
|
||||
private func buildFileTimelineItemContent(_ messageContent: FileMessageContent) -> FileRoomTimelineItemContent {
|
||||
@@ -568,7 +566,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
state: OtherState,
|
||||
stateKey: String,
|
||||
isOutgoing: Bool) -> RoomTimelineItemProtocol? {
|
||||
guard let text = stateEventStringBuilder.buildString(for: state, stateKey: stateKey, sender: eventItemProxy.sender, isOutgoing: isOutgoing) else { return nil }
|
||||
guard let text = stateEventStringBuilder.buildString(for: state, sender: eventItemProxy.sender, isOutgoing: isOutgoing) else { return nil }
|
||||
return buildStateTimelineItem(for: eventItemProxy, text: text, isOutgoing: isOutgoing)
|
||||
}
|
||||
|
||||
@@ -680,17 +678,6 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
private extension LocationRoomTimelineItemContent.AssetType {
|
||||
init(assetType: MatrixRustSDK.AssetType) {
|
||||
switch assetType {
|
||||
case .sender:
|
||||
self = .sender
|
||||
case .pin:
|
||||
self = .pin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Poll.Kind {
|
||||
init(pollKind: MatrixRustSDK.PollKind) {
|
||||
switch pollKind {
|
||||
|
||||
Reference in New Issue
Block a user