diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index bf687d3bbc..4cf13623e7 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -82,6 +82,7 @@ import net.osmand.plus.dashboard.DashboardOnMap; import net.osmand.plus.dialogs.ErrorBottomSheetDialog; import net.osmand.plus.dialogs.RateUsBottomSheetDialog; import net.osmand.plus.dialogs.WhatsNewDialogFragment; +import net.osmand.plus.dialogs.XMasDialogFragment; import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents; import net.osmand.plus.download.ui.DataStoragePlaceDialogFragment; @@ -890,6 +891,11 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven return true; } + public void showXMasDialog() { + dismissSecondSplashScreen(); + new XMasDialogFragment().show(getSupportFragmentManager(), XMasDialogFragment.TAG); + } + private void dismissSecondSplashScreen() { if (SecondSplashScreenFragment.VISIBLE) { SecondSplashScreenFragment.VISIBLE = false; diff --git a/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java b/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java index fff4d7e972..34d5b1f60b 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/DiscountHelper.java @@ -25,7 +25,6 @@ import net.osmand.plus.R; import net.osmand.plus.Version; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.chooseplan.ChoosePlanDialogFragment; -import net.osmand.plus.dialogs.XMasDialogFragment; import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.plus.poi.PoiFiltersHelper; import net.osmand.plus.poi.PoiUIFilter; @@ -151,7 +150,7 @@ public class DiscountHelper { settings.DISCOUNT_SHOW_NUMBER_OF_STARTS.set(app.getAppInitializer().getNumberOfStarts()); settings.DISCOUNT_SHOW_DATETIME_MS.set(System.currentTimeMillis()); if (showChristmasDialog) { - new XMasDialogFragment().show(mapActivity.getSupportFragmentManager(), XMasDialogFragment.TAG); + mapActivity.showXMasDialog(); } else { showDiscountBanner(mapActivity, data); }