vector-im/element-ios/issues/5298 - Add support for location m.asset types.

This commit is contained in:
Stefan Ceriu
2022-01-18 11:32:30 +02:00
committed by Stefan Ceriu
parent fc166cc43c
commit c6e5d2ebc0
6 changed files with 36 additions and 20 deletions
@@ -37,11 +37,17 @@ class LocationBubbleCell: SizableBaseBubbleCell, BubbleCellReactionsDisplayable
let location = CLLocationCoordinate2D(latitude: locationContent.latitude, longitude: locationContent.longitude)
locationView.displayLocation(location,
userIdentifier: bubbleData.senderId,
userDisplayName: bubbleData.senderDisplayName,
userAvatarURLString: bubbleData.senderAvatarUrl,
mediaManager: bubbleData.mxSession.mediaManager)
if locationContent.assetType == .user {
let avatarViewData = AvatarViewData(matrixItemId: bubbleData.senderId,
displayName: bubbleData.senderDisplayName,
avatarUrl: bubbleData.senderAvatarUrl,
mediaManager: bubbleData.mxSession.mediaManager,
fallbackImage: .matrixItem(bubbleData.senderId, bubbleData.senderDisplayName))
locationView.displayLocation(location, userAvatarData: avatarViewData)
} else {
locationView.displayLocation(location)
}
}
override func setupViews() {