mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
implementing static location sheet
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ enum TimelineControllerAction {
|
||||
}
|
||||
|
||||
case displayMediaPreview(item: EventBasedMessageTimelineItemProtocol, timelineViewModel: TimelineViewModelKind)
|
||||
case displayLocation(senderID: String?, geoURI: GeoURI)
|
||||
case displayLocation(StaticLocationData)
|
||||
case none
|
||||
}
|
||||
|
||||
|
||||
+16
-16
@@ -9,29 +9,29 @@
|
||||
import MatrixRustSDK
|
||||
|
||||
struct LocationRoomTimelineItemContent: Hashable {
|
||||
enum Kind {
|
||||
case sender
|
||||
case pin
|
||||
|
||||
init(from asset: AssetType?) {
|
||||
self = switch asset {
|
||||
case .pin:
|
||||
.pin
|
||||
case .sender, .none:
|
||||
.sender
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let body: String
|
||||
let geoURI: GeoURI?
|
||||
let kind: Kind
|
||||
let kind: StaticLocationKind
|
||||
|
||||
init(body: String,
|
||||
geoURI: GeoURI? = nil,
|
||||
kind: Kind = .sender) {
|
||||
kind: StaticLocationKind = .sender) {
|
||||
self.body = body
|
||||
self.geoURI = geoURI
|
||||
self.kind = kind
|
||||
}
|
||||
}
|
||||
|
||||
enum StaticLocationKind {
|
||||
case sender
|
||||
case pin
|
||||
|
||||
init(from asset: AssetType?) {
|
||||
switch asset {
|
||||
case .pin:
|
||||
self = .pin
|
||||
default:
|
||||
self = .sender
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user