[iOS] don't show taxi component in pp when offline or no location

https://jira.mail.ru/browse/MAPSME-14726
This commit is contained in:
Aleksey Belousov 2020-09-02 07:13:03 +03:00 committed by Maksim Andrianov
parent e417fb23cc
commit 5ecb9bb357

View file

@ -83,6 +83,7 @@ class PlacePageCommonLayout: NSObject, IPlacePageLayout {
let vc = storyboard.instantiateViewController(ofType: TaxiViewController.self)
vc.taxiProvider = placePageData.taxiProvider
vc.delegate = interactor
vc.view.isHidden = true
return vc
} ()
@ -239,6 +240,10 @@ class PlacePageCommonLayout: NSObject, IPlacePageLayout {
onHeadingUpdate(lastHeading)
}
if !MWMLocationManager.isLocationProhibited() && FrameworkHelper.isNetworkConnected() {
taxiViewController.view.isHidden = false
}
placePageData.onMapNodeStatusUpdate = { [weak self] in
guard let self = self else { return }
self.actionBarViewController.updateDownloadButtonState(self.placePageData.mapNodeAttributes!.nodeStatus)