mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
implementing static location sheet
This commit is contained in:
+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