forked from organicmaps/organicmaps
[iOS] open booking.com for non-booking.com hotels
This commit is contained in:
parent
3141f335c9
commit
c5b9e51a79
4 changed files with 14 additions and 1 deletions
|
@ -195,7 +195,7 @@ extension PlacePageInteractor: ActionBarViewControllerDelegate {
|
|||
case .booking:
|
||||
MWMPlacePageManagerHelper.book(placePageData)
|
||||
case .bookingSearch:
|
||||
MWMPlacePageManagerHelper.searchSimilar(placePageData)
|
||||
MWMPlacePageManagerHelper.searchBookingHotels(placePageData)
|
||||
case .bookmark:
|
||||
if placePageData.bookmarkData != nil {
|
||||
MWMPlacePageManagerHelper.removeBookmark(placePageData)
|
||||
|
|
|
@ -302,6 +302,13 @@ void RegisterEventIfPossible(eye::MapObject::Event::Type const type)
|
|||
[self.ownerViewController openFullPlaceDescriptionWithHtml:htmlString];
|
||||
}
|
||||
|
||||
- (void)searchBookingHotels:(PlacePageData *)data {
|
||||
logSponsoredEvent(data, kStatPlacePageHotelBook);
|
||||
NSURL *url = [NSURL URLWithString:data.bookingSearchUrl];
|
||||
NSAssert(url, @"Search url can't be nil!");
|
||||
[UIApplication.sharedApplication openURL:url options:@{} completionHandler:nil];
|
||||
}
|
||||
|
||||
- (void)openPartner:(PlacePageData *)data withStatisticLog:(NSString *)eventName proposedUrl:(NSURL *)proposedUrl
|
||||
{
|
||||
logSponsoredEvent(data, eventName);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
+ (void)addBookmark:(PlacePageData *)data;
|
||||
+ (void)removeBookmark:(PlacePageData *)data;
|
||||
+ (void)editBookmark:(PlacePageData *)data;
|
||||
+ (void)searchBookingHotels:(PlacePageData *)data;
|
||||
+ (void)openPartner:(PlacePageData *)data;
|
||||
+ (void)book:(PlacePageData *)data;
|
||||
+ (void)share:(PlacePageData *)data;
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
- (void)addBookmark:(PlacePageData *)data;
|
||||
- (void)removeBookmark:(PlacePageData *)data;
|
||||
- (void)editBookmark:(PlacePageData *)data;
|
||||
- (void)searchBookingHotels:(PlacePageData *)data;
|
||||
- (void)openPartner:(PlacePageData *)data;
|
||||
- (void)book:(PlacePageData *)data;
|
||||
- (void)share:(PlacePageData *)data;
|
||||
|
@ -129,6 +130,10 @@
|
|||
[[MWMMapViewControlsManager manager].placePageManager editBookmark:data];
|
||||
}
|
||||
|
||||
+ (void)searchBookingHotels:(PlacePageData *)data {
|
||||
[[MWMMapViewControlsManager manager].placePageManager searchBookingHotels:data];
|
||||
}
|
||||
|
||||
+ (void)openPartner:(PlacePageData *)data {
|
||||
[[MWMMapViewControlsManager manager].placePageManager openPartner:data];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue