From 7fe7a6331adc4ab13674b3272b61cd20c80772f6 Mon Sep 17 00:00:00 2001 From: rsudev Date: Sat, 17 May 2014 22:28:08 +0200 Subject: Implements #96, Change log / What's new popup on start - Checks the last version from preferences with current - Stores current version - switches to about - changelog on version change --- main/src/cgeo/geocaching/MainActivity.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'main/src/cgeo/geocaching/MainActivity.java') diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java index 473d870..8de27b0 100644 --- a/main/src/cgeo/geocaching/MainActivity.java +++ b/main/src/cgeo/geocaching/MainActivity.java @@ -213,6 +213,8 @@ public class MainActivity extends AbstractActionBarActivity { Log.i("Starting " + getPackageName() + ' ' + version + " a.k.a " + Version.getVersionName(this)); init(); + + checkShowChangelog(); } @Override @@ -726,6 +728,16 @@ public class MainActivity extends AbstractActionBarActivity { } } + private void checkShowChangelog() { + int lastVersion = Settings.getLastChangelogVersion(); + int version = Version.getVersionCode(this); + Settings.setLastChangelogVersion(version); + // don't show change log after new install... + if (lastVersion > 0 && version != lastVersion) { + AboutActivity.showChangeLog(this); + } + } + /** * @param view * unused here but needed since this method is referenced from XML layout -- cgit v1.1