diff --git a/iphone/Maps/TipsAndTricks/TutorialViewController.swift b/iphone/Maps/TipsAndTricks/TutorialViewController.swift index 9b6319e8c1..dd3bad68f9 100644 --- a/iphone/Maps/TipsAndTricks/TutorialViewController.swift +++ b/iphone/Maps/TipsAndTricks/TutorialViewController.swift @@ -101,8 +101,8 @@ class TutorialViewController: UIViewController { extension TutorialViewController { @objc static func tutorial(_ type: TutorialType, target: UIControl, - delegate: TutorialViewControllerDelegate) -> TutorialViewController { - let result: TutorialViewController + delegate: TutorialViewControllerDelegate) -> TutorialViewController? { + let result: TutorialViewController? switch type { case .search: result = searchTutorialBlur() @@ -115,8 +115,9 @@ extension TutorialViewController { case .bookmarks: result = bookmarksTutorialBlur() } - result.targetView = target - result.delegate = delegate + + result?.targetView = target + result?.delegate = delegate return result } @@ -124,25 +125,28 @@ extension TutorialViewController { return TutorialViewController(nibName: "BookmarksTutorial", bundle: nil) } - private static func bookmarksTutorialBlur() -> TutorialViewController { - let result = TutorialViewController(nibName: "BookmarksTutorialBlur", bundle: nil) - result.customAction = { - MapViewController.shared().openCatalog(animated: true, utm: .tipsAndTricks) - } - return result + private static func bookmarksTutorialBlur() -> TutorialViewController? { +// let result = TutorialViewController(nibName: "BookmarksTutorialBlur", bundle: nil) +// result.customAction = { +// MapViewController.shared().openCatalog(animated: true, utm: .tipsAndTricks) +// } +// return result + return nil } - private static func searchTutorialBlur() -> TutorialViewController { - let result = TutorialViewController(nibName: "SearchTutorialBlur", bundle: nil) - result.customAction = { - MapViewController.shared().searchText(L("hotel").appending(" ")) - } - return result + private static func searchTutorialBlur() -> TutorialViewController? { +// let result = TutorialViewController(nibName: "SearchTutorialBlur", bundle: nil) +// result.customAction = { +// MapViewController.shared().searchText(L("hotel").appending(" ")) +// } +// return result + return nil } - private static func discoveryTutorialBlur() -> TutorialViewController { - let result = TutorialViewController(nibName: "DiscoveryTutorialBlur", bundle: nil) - return result + private static func discoveryTutorialBlur() -> TutorialViewController? { +// let result = TutorialViewController(nibName: "DiscoveryTutorialBlur", bundle: nil) +// return result + return nil } private static func subwayTutorialBlur() -> TutorialViewController { diff --git a/iphone/Maps/UI/PlacePage/Components/ActionBarViewController.swift b/iphone/Maps/UI/PlacePage/Components/ActionBarViewController.swift index b389fee641..30ce0562b3 100644 --- a/iphone/Maps/UI/PlacePage/Components/ActionBarViewController.swift +++ b/iphone/Maps/UI/PlacePage/Components/ActionBarViewController.swift @@ -105,15 +105,15 @@ class ActionBarViewController: UIViewController { if isRoutePlanning { buttons.append(.routeFrom) } - if placePageData.previewData.isBookingPlace { - buttons.append(.booking) - } - if placePageData.isPartner { - buttons.append(.partner) - } - if placePageData.bookingSearchUrl != nil { - buttons.append(.bookingSearch) - } +// if placePageData.previewData.isBookingPlace { +// buttons.append(.booking) +// } +// if placePageData.isPartner { +// buttons.append(.partner) +// } +// if placePageData.bookingSearchUrl != nil { +// buttons.append(.bookingSearch) +// } if placePageData.infoData?.phone != nil, AppInfo.shared().canMakeCalls { buttons.append(.call) } diff --git a/iphone/Maps/UI/PlacePage/Components/PlacePageButtonsViewController.swift b/iphone/Maps/UI/PlacePage/Components/PlacePageButtonsViewController.swift index ffc1a83187..434f7f6fe1 100644 --- a/iphone/Maps/UI/PlacePage/Components/PlacePageButtonsViewController.swift +++ b/iphone/Maps/UI/PlacePage/Components/PlacePageButtonsViewController.swift @@ -6,13 +6,14 @@ protocol PlacePageButtonsViewControllerDelegate: AnyObject { } class PlacePageButtonsViewController: UIViewController { - @IBOutlet var bookingButton: UIButton! +// @IBOutlet var bookingButton: UIButton! @IBOutlet var addPlaceButton: UIButton! @IBOutlet var editPlaceButton: UIButton! - @IBOutlet var addBusinessButton: UIButton! +// @IBOutlet var addBusinessButton: UIButton! private var buttons: [UIButton?] { - [bookingButton, addPlaceButton, editPlaceButton, addBusinessButton] +// [bookingButton, addPlaceButton, editPlaceButton, addBusinessButton] + [addPlaceButton, editPlaceButton] } var buttonsData: PlacePageButtonsData! @@ -29,10 +30,10 @@ class PlacePageButtonsViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - bookingButton.isHidden = !buttonsData.showHotelDescription +// bookingButton.isHidden = !buttonsData.showHotelDescription addPlaceButton.isHidden = !buttonsData.showAddPlace editPlaceButton.isHidden = !buttonsData.showEditPlace - addBusinessButton.isHidden = !buttonsData.showAddBusiness +// addBusinessButton.isHidden = !buttonsData.showAddBusiness buttons.forEach { $0?.isEnabled = buttonsEnabled diff --git a/iphone/Maps/UI/PlacePage/Components/PlacePageInfoViewController.swift b/iphone/Maps/UI/PlacePage/Components/PlacePageInfoViewController.swift index 2388236034..1434b83cbb 100644 --- a/iphone/Maps/UI/PlacePage/Components/PlacePageInfoViewController.swift +++ b/iphone/Maps/UI/PlacePage/Components/PlacePageInfoViewController.swift @@ -159,16 +159,16 @@ class PlacePageInfoViewController: UIViewController { coordinatesView?.accessoryImage.isHidden = false coordinatesView?.canShowMenu = true - switch placePageInfoData.localAdsStatus { - case .candidate: - localAdsButton = createLocalAdsButton(L("create_campaign_button")) - case .customer: - localAdsButton = createLocalAdsButton(L("view_campaign_button")) - case .notAvailable, .hidden: - coordinatesView?.separatorView.isHidden = true - @unknown default: - fatalError() - } +// switch placePageInfoData.localAdsStatus { +// case .candidate: +// localAdsButton = createLocalAdsButton(L("create_campaign_button")) +// case .customer: +// localAdsButton = createLocalAdsButton(L("view_campaign_button")) +// case .notAvailable, .hidden: +// coordinatesView?.separatorView.isHidden = true +// @unknown default: +// fatalError() +// } } // MARK: private diff --git a/iphone/Maps/UI/PlacePage/Components/PlacePagePreviewViewController.swift b/iphone/Maps/UI/PlacePage/Components/PlacePagePreviewViewController.swift index 87dba24ff5..21aeef17a9 100644 --- a/iphone/Maps/UI/PlacePage/Components/PlacePagePreviewViewController.swift +++ b/iphone/Maps/UI/PlacePage/Components/PlacePagePreviewViewController.swift @@ -111,15 +111,15 @@ final class PlacePagePreviewViewController: UIViewController { addressContainerView.isHidden = true } - if let pricing = placePagePreviewData.pricing { - priceLabel.text = pricing - } else { - priceLabel.isHidden = true - } - searchSimilarContainerView.isHidden = placePagePreviewData.hotelType == .none +// if let pricing = placePagePreviewData.pricing { +// priceLabel.text = pricing +// } else { +// priceLabel.isHidden = true +// } +// searchSimilarContainerView.isHidden = placePagePreviewData.hotelType == .none configSchedule() - configUgc() - ugcContainerView.isHidden = !placePagePreviewData.isBookingPlace +// configUgc() +// ugcContainerView.isHidden = !placePagePreviewData.isBookingPlace } func updateUgc(_ ugcData: UgcData) { diff --git a/iphone/Maps/UI/PlacePage/PlacePage.storyboard b/iphone/Maps/UI/PlacePage/PlacePage.storyboard index 3df1787f3e..7b93794d0c 100644 --- a/iphone/Maps/UI/PlacePage/PlacePage.storyboard +++ b/iphone/Maps/UI/PlacePage/PlacePage.storyboard @@ -1,9 +1,9 @@ - + - + @@ -217,10 +217,10 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -428,25 +315,16 @@ - - - - - - - - - @@ -590,312 +468,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -929,446 +501,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1380,23 +512,8 @@ - - @@ -1457,9 +559,7 @@ - - @@ -1467,281 +567,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2013,343 +838,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3104,72 +1592,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3975,17 +2397,8 @@ - - - - - - - - - diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Layouts/PlacePageCommonLayout.swift b/iphone/Maps/UI/PlacePage/PlacePageLayout/Layouts/PlacePageCommonLayout.swift index 5c8540c93d..112e6b0f40 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Layouts/PlacePageCommonLayout.swift +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Layouts/PlacePageCommonLayout.swift @@ -205,10 +205,10 @@ class PlacePageCommonLayout: NSObject, IPlacePageLayout { } } - viewControllers.append(hotelPhotosViewController) - viewControllers.append(hotelDescriptionViewController) - viewControllers.append(hotelFacilitiesViewController) - viewControllers.append(hotelReviewsViewController) +// viewControllers.append(hotelPhotosViewController) +// viewControllers.append(hotelDescriptionViewController) +// viewControllers.append(hotelFacilitiesViewController) +// viewControllers.append(hotelReviewsViewController) if placePageData.infoData != nil { viewControllers.append(keyInformationDividerViewController) @@ -216,18 +216,24 @@ class PlacePageCommonLayout: NSObject, IPlacePageLayout { viewControllers.append(infoViewController) } - if placePageData.previewData.showUgc { - viewControllers.append(ratingSummaryViewController) - viewControllers.append(addReviewViewController) - viewControllers.append(reviewsViewController) - placePageData.loadUgc(completion: onLoadUgc) - } +// if placePageData.taxiProvider != .none && +// !LocationManager.isLocationProhibited() && +// FrameworkHelper.isNetworkConnected() { +// viewControllers.append(taxiViewController) +// } + +// if placePageData.previewData.showUgc { +// viewControllers.append(ratingSummaryViewController) +// viewControllers.append(addReviewViewController) +// viewControllers.append(reviewsViewController) +// placePageData.loadUgc(completion: onLoadUgc) +// } if placePageData.buttonsData != nil { viewControllers.append(buttonsViewController) } - placePageData.loadOnlineData(completion: onLoadOnlineData) +// placePageData.loadOnlineData(completion: onLoadOnlineData) placePageData.onBookmarkStatusUpdate = { [weak self] in guard let self = self else { return } if self.placePageData.bookmarkData == nil { @@ -236,9 +242,9 @@ class PlacePageCommonLayout: NSObject, IPlacePageLayout { self.previewViewController.placePagePreviewData = self.placePageData.previewData self.updateBookmarkRelatedSections() } - placePageData.onUgcStatusUpdate = { [weak self] in - self?.onLoadUgc() - } +// placePageData.onUgcStatusUpdate = { [weak self] in +// self?.onLoadUgc() +// } LocationManager.add(observer: self) if let lastLocation = LocationManager.lastLocation() {