5720: Rework some location sharing related view

This commit is contained in:
MaximeE
2022-03-23 15:48:19 +01:00
parent 8e3107095f
commit 7f140388a1
35 changed files with 218 additions and 126 deletions
@@ -21,6 +21,10 @@ import Mapbox
@available(iOS 14, *)
class UserLocationAnnotatonView: MGLUserLocationAnnotationView {
// MARK: Private
@Environment(\.theme) private var theme: ThemeSwiftUI
// MARK: - Setup
init(avatarData: AvatarInputProtocol) {
@@ -45,7 +49,10 @@ class UserLocationAnnotatonView: MGLUserLocationAnnotationView {
private func addUserMarkerView(with avatarData: AvatarInputProtocol) {
guard let avatarImageView = UIHostingController(rootView: LocationSharingUserMarkerView(isMarker: true, avatarData: avatarData)).view else {
guard let avatarImageView = UIHostingController(rootView: LocationSharingMarkerView(backgroundColor: theme.displayUserColor(for: avatarData.matrixItemId)) {
AvatarImage(avatarData: avatarData, size: nil)
.shapedBorder(color: theme.displayUserColor(for: avatarData.matrixItemId), borderWidth: 3, shape: Circle())
}).view else {
return
}