implementing static location sheet

This commit is contained in:
Mauro Romito
2026-03-06 12:53:39 +01:00
committed by Mauro
parent bbbb2e9dee
commit 9e68da4ff0
45 changed files with 447 additions and 258 deletions
@@ -25,7 +25,7 @@ enum TimelineControllerAction {
}
case displayMediaPreview(item: EventBasedMessageTimelineItemProtocol, timelineViewModel: TimelineViewModelKind)
case displayLocation(senderID: String?, geoURI: GeoURI)
case displayLocation(StaticLocationData)
case none
}
@@ -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
}
}
}