diff --git a/OsmAnd/src/net/osmand/plus/FirstUsageFragment.java b/OsmAnd/src/net/osmand/plus/FirstUsageFragment.java index 63d289dddc..6342ef13b4 100644 --- a/OsmAnd/src/net/osmand/plus/FirstUsageFragment.java +++ b/OsmAnd/src/net/osmand/plus/FirstUsageFragment.java @@ -21,6 +21,7 @@ import net.osmand.plus.download.DownloadActivity; public class FirstUsageFragment extends Fragment { public static final String TAG = "FirstUsageFragment"; + public static boolean SHOW = true; @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index d168316dd7..21cd98958a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -176,7 +176,9 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents { mapView = new OsmandMapTileView(this, getWindow().getDecorView().getWidth(), getWindow().getDecorView().getHeight()); - if(app.getAppInitializer().checkAppVersionChanged(this)) { + if(app.getAppInitializer().checkAppVersionChanged(this) && + WhatsNewDialogFragment.SHOW) { + WhatsNewDialogFragment.SHOW = false; new WhatsNewDialogFragment().show(getSupportFragmentManager(), null); } mapActions = new MapActivityActions(this); @@ -238,7 +240,8 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents { } mapView.refreshMap(true); - if (getMyApplication().getAppInitializer().isFirstTime(this)) { + if (getMyApplication().getAppInitializer().isFirstTime(this) && FirstUsageFragment.SHOW) { + FirstUsageFragment.SHOW = false; getSupportFragmentManager().beginTransaction() .add(R.id.fragmentContainer, new FirstUsageFragment(), FirstUsageFragment.TAG).commit(); diff --git a/OsmAnd/src/net/osmand/plus/dialogs/WhatsNewDialogFragment.java b/OsmAnd/src/net/osmand/plus/dialogs/WhatsNewDialogFragment.java index cc6a209a6f..857de6d21b 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/WhatsNewDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/WhatsNewDialogFragment.java @@ -19,6 +19,7 @@ import org.apache.commons.logging.Log; public class WhatsNewDialogFragment extends DialogFragment { private static final Log LOG = PlatformUtil.getLog(WhatsNewDialogFragment.class); + public static boolean SHOW = true; @NonNull @Override