mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
vector-im/element-ios/issues/5298 - Implemented location sharing from the input toolbar action menu.
This commit is contained in:
committed by
Stefan Ceriu
parent
fb16d96ac1
commit
37db201124
@@ -34,13 +34,24 @@ class LocationBubbleCell: SizableBaseBubbleCell, BubbleCellReactionsDisplayable
|
||||
return
|
||||
}
|
||||
|
||||
let locationString = geoURI.components(separatedBy: ":").last?.components(separatedBy: ";").first
|
||||
|
||||
guard let locationComponents = locationString?.components(separatedBy: ","),
|
||||
let latitude = locationComponents.first?.double,
|
||||
let longitude = locationComponents.last?.double
|
||||
else {
|
||||
return
|
||||
}
|
||||
|
||||
let location = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
|
||||
|
||||
locationView.locationDescription = content[kMXMessageContentKeyExtensibleLocationDescription]
|
||||
|
||||
locationView.displayGeoURI(geoURI,
|
||||
userIdentifier: bubbleData.senderId,
|
||||
userDisplayName: bubbleData.senderDisplayName,
|
||||
userAvatarURL: bubbleData.senderAvatarUrl,
|
||||
mediaManager: bubbleData.mxSession.mediaManager)
|
||||
locationView.displayLocation(location,
|
||||
userIdentifier: bubbleData.senderId,
|
||||
userDisplayName: bubbleData.senderDisplayName,
|
||||
userAvatarURL: bubbleData.senderAvatarUrl,
|
||||
mediaManager: bubbleData.mxSession.mediaManager)
|
||||
}
|
||||
|
||||
override func setupViews() {
|
||||
|
||||
Reference in New Issue
Block a user