diff --git a/android/src/com/mapswithme/maps/purchase/PurchaseFactory.java b/android/src/com/mapswithme/maps/purchase/PurchaseFactory.java index 01bfc12c4b..4e5aed1691 100644 --- a/android/src/com/mapswithme/maps/purchase/PurchaseFactory.java +++ b/android/src/com/mapswithme/maps/purchase/PurchaseFactory.java @@ -29,7 +29,7 @@ public class PurchaseFactory public static PurchaseController createBookmarksSightsSubscriptionController( @NonNull Context context) { - return createSubscriptionPurchaseController(context, SubscriptionType.BOOKMARKS_ALL); + return createSubscriptionPurchaseController(context, SubscriptionType.BOOKMARKS_SIGHTS); } @NonNull diff --git a/iphone/Maps/Core/Subscriptions/MWMPurchaseManager.mm b/iphone/Maps/Core/Subscriptions/MWMPurchaseManager.mm index 0387e9a576..903afc610c 100644 --- a/iphone/Maps/Core/Subscriptions/MWMPurchaseManager.mm +++ b/iphone/Maps/Core/Subscriptions/MWMPurchaseManager.mm @@ -193,11 +193,11 @@ } + (void)setBookmarksSubscriptionActive:(BOOL)active { - GetFramework().GetPurchase()->SetSubscriptionEnabled(SubscriptionType::BookmarkCatalog, active); + GetFramework().GetPurchase()->SetSubscriptionEnabled(SubscriptionType::BookmarksSights, active); } + (void)setAllPassSubscriptionActive:(BOOL)active { - GetFramework().GetPurchase()->SetSubscriptionEnabled(SubscriptionType::AllPass, active); + GetFramework().GetPurchase()->SetSubscriptionEnabled(SubscriptionType::BookmarksAll, active); } #pragma mark - SKRequestDelegate diff --git a/map/crown.cpp b/map/crown.cpp index a7df1c94b0..1e7b2961d6 100644 --- a/map/crown.cpp +++ b/map/crown.cpp @@ -22,7 +22,7 @@ namespace crown { bool NeedToShow(std::unique_ptr const & purchase) { - if (!purchase || purchase->IsSubscriptionActive(SubscriptionType::BookmarkCatalog) || + if (!purchase || purchase->IsSubscriptionActive(SubscriptionType::BookmarksAll) || !GetPlatform().IsConnected()) { return false; diff --git a/map/purchase.cpp b/map/purchase.cpp index 6d39bbc62b..99943a111c 100644 --- a/map/purchase.cpp +++ b/map/purchase.cpp @@ -34,8 +34,9 @@ std::string const kReceiptType {}; std::array(SubscriptionType::Count)> const kSubscriptionSuffix = { - "", // RemoveAds (empty string for back compatibility) - "_BookmarkCatalog", // BookmarkCatalog + "", // removeAds (empty string for back compatibility) + "_BookmarkCatalog", // bookmarks city + outdoor (AllPass) + "_BookmarksSights" // bookmarks city }; uint32_t constexpr kFirstWaitingTimeInSec = 1; @@ -166,11 +167,17 @@ void Purchase::SetSubscriptionEnabled(SubscriptionType type, bool isEnabled) listener->OnSubscriptionChanged(type, isEnabled); auto const nowStr = GetPlatform().GetMarketingService().GetPushWooshTimestamp(); - if (type == SubscriptionType::BookmarkCatalog) + if (type == SubscriptionType::BookmarksSights) { GetPlatform().GetMarketingService().SendPushWooshTag(isEnabled ? - marketing::kBookmarkCatalogSubscriptionEnabled : - marketing::kBookmarkCatalogSubscriptionDisabled, nowStr); + marketing::kSubscriptionBookmarksSightsEnabled : + marketing::kSubscriptionBookmarksSightsDisabled, nowStr); + } + else if (type == SubscriptionType::BookmarksAll) + { + GetPlatform().GetMarketingService().SendPushWooshTag(isEnabled ? + marketing::kSubscriptionBookmarksAllEnabled : + marketing::kSubscriptionBookmarksAllDisabled, nowStr); } else if (type == SubscriptionType::RemoveAds) { diff --git a/map/purchase.hpp b/map/purchase.hpp index 52c6dc5c38..94b0f93071 100644 --- a/map/purchase.hpp +++ b/map/purchase.hpp @@ -12,8 +12,8 @@ enum class SubscriptionType : uint8_t { RemoveAds = 0, - BookmarkCatalog, - AllPass, + BookmarksAll, + BookmarksSights, Count }; diff --git a/platform/marketing_service.cpp b/platform/marketing_service.cpp index fd761409e9..d7163df598 100644 --- a/platform/marketing_service.cpp +++ b/platform/marketing_service.cpp @@ -26,8 +26,14 @@ char const * const kEditorEditDiscovered = "editor_edit_discovered"; char const * const kTrafficDiscovered = "traffic_discovered"; char const * const kDiscoveryButtonDiscovered = "discovery_button_discovered"; char const * const kBookHotelOnBookingComDiscovered = "hotel_book_bcom_discovered"; -char const * const kBookmarkCatalogSubscriptionEnabled = "bookmark_catalog_subscription_enabled"; -char const * const kBookmarkCatalogSubscriptionDisabled = "bookmark_catalog_subscription_disabled"; +char const * const kSubscriptionBookmarksAllEnabled = + "bookmark_catalog_subscription_city_outdoor_enabled"; +char const * const kSubscriptionBookmarksAllDisabled = + "bookmark_catalog_subscription_city_outdoor_disabled"; +char const * const kSubscriptionBookmarksSightsEnabled = + "bookmark_catalog_subscription_city_enabled"; +char const * const kSubscriptionBookmarksSightsDisabled = + "bookmark_catalog_subscription_city_disabled"; char const * const kRemoveAdsSubscriptionEnabled = "remove_ads_subscription_enabled"; char const * const kRemoveAdsSubscriptionDisabled = "remove_ads_subscription_disabled"; diff --git a/platform/marketing_service.hpp b/platform/marketing_service.hpp index df6a858b66..2ceffb637a 100644 --- a/platform/marketing_service.hpp +++ b/platform/marketing_service.hpp @@ -30,8 +30,10 @@ extern char const * const kEditorEditDiscovered; extern char const * const kTrafficDiscovered; extern char const * const kDiscoveryButtonDiscovered; extern char const * const kBookHotelOnBookingComDiscovered; -extern char const * const kBookmarkCatalogSubscriptionEnabled; -extern char const * const kBookmarkCatalogSubscriptionDisabled; +extern char const * const kSubscriptionBookmarksAllEnabled; +extern char const * const kSubscriptionBookmarksAllDisabled; +extern char const * const kSubscriptionBookmarksSightsEnabled; +extern char const * const kSubscriptionBookmarksSightsDisabled; extern char const * const kRemoveAdsSubscriptionEnabled; extern char const * const kRemoveAdsSubscriptionDisabled;