LocationSharingCoordinator: Handle live location sharing lab flag presentation.

This commit is contained in:
SBiOSoftWhare
2022-07-04 17:39:45 +02:00
parent a2c4060272
commit 051817509b
3 changed files with 53 additions and 4 deletions
@@ -138,7 +138,7 @@ class LocationSharingViewModel: LocationSharingViewModelType, LocationSharingVie
}
}
private func startLiveLocationSharing() {
private func checkLocationAuthorizationAndPresentTimerSelector() {
self.locationSharingService.requestAuthorization { [weak self] authorizationStatus in
@@ -165,4 +165,17 @@ class LocationSharingViewModel: LocationSharingViewModelType, LocationSharingVie
}
}
}
private func startLiveLocationSharing() {
guard let completion = completion else {
return
}
completion(.showLabFlagPromotionIfNeeded({ liveLocationEnabled in
if liveLocationEnabled {
self.checkLocationAuthorizationAndPresentTimerSelector()
}
}))
}
}