diff options
| author | rsudev <rasch@munin-soft.de> | 2014-05-17 22:28:08 +0200 |
|---|---|---|
| committer | rsudev <rasch@munin-soft.de> | 2014-05-18 22:41:07 +0200 |
| commit | 7fe7a6331adc4ab13674b3272b61cd20c80772f6 (patch) | |
| tree | 0818f1b567c0373af2e9d8b9821e8817b1060559 /main/src/cgeo/geocaching/MainActivity.java | |
| parent | 916992dc8398db364927a50a8ceb46f3053fce96 (diff) | |
| download | cgeo-7fe7a6331adc4ab13674b3272b61cd20c80772f6.zip cgeo-7fe7a6331adc4ab13674b3272b61cd20c80772f6.tar.gz cgeo-7fe7a6331adc4ab13674b3272b61cd20c80772f6.tar.bz2 | |
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
Diffstat (limited to 'main/src/cgeo/geocaching/MainActivity.java')
| -rw-r--r-- | main/src/cgeo/geocaching/MainActivity.java | 12 |
1 files changed, 12 insertions, 0 deletions
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 |
