vector-im/element-ios/issues/5298 - Implemented location sharing from the input toolbar action menu.

This commit is contained in:
Stefan Ceriu
2021-12-16 14:02:42 +02:00
committed by Stefan Ceriu
parent fb16d96ac1
commit 37db201124
30 changed files with 867 additions and 36 deletions
@@ -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() {