mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
fixed a bug that made the map still follow your location, even whan trying to center the map on an annotation.
This commit is contained in:
@@ -67,13 +67,15 @@ struct LiveLocationSheet: View {
|
||||
if let profile = context.viewState.userProfiles[liveLocationShare.userID] {
|
||||
Button {
|
||||
guard let geoURI = liveLocationShare.geoURI else { return }
|
||||
context.mapCenterLocation = .init(latitude: geoURI.latitude, longitude: geoURI.longitude)
|
||||
context.send(viewAction: .setMapCenter(.init(latitude: geoURI.latitude, longitude: geoURI.longitude)))
|
||||
} label: {
|
||||
UserLocationCell(profile: profile,
|
||||
isOwnUser: context.viewState.isOwnUser(liveLocationShare.userID),
|
||||
kind: .live,
|
||||
mediaProvider: context.mediaProvider,
|
||||
onShare: { context.sharedAnnotation = context.viewState.annotations.first { $0.id == liveLocationShare.id }},
|
||||
onShare: {
|
||||
context.sharedAnnotation = context.viewState.annotations.first { $0.id == liveLocationShare.id }
|
||||
},
|
||||
onStop: { context.send(viewAction: .stopLiveLocation) })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user