diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-05-09 14:11:36 -0600 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-05-09 14:11:36 -0600 |
commit | 23d0e8b7b74bc80ce7e6d57a74ab915285324b52 (patch) | |
tree | be7fb7e192c9f4069754355f417c930158ea3069 | |
parent | dba6756bfd1c9460fda67b9b653c7e875632c16b (diff) | |
download | dsub-23d0e8b7b74bc80ce7e6d57a74ab915285324b52.tar.gz dsub-23d0e8b7b74bc80ce7e6d57a74ab915285324b52.tar.bz2 dsub-23d0e8b7b74bc80ce7e6d57a74ab915285324b52.zip |
Don't run old updates for new users
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/updates/Updater.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/updates/Updater.java b/subsonic-android/src/github/daneren2005/dsub/updates/Updater.java index 3f8876b9..c239fa43 100644 --- a/subsonic-android/src/github/daneren2005/dsub/updates/Updater.java +++ b/subsonic-android/src/github/daneren2005/dsub/updates/Updater.java @@ -46,8 +46,13 @@ public class Updater { updaters.add(new Updater373());
SharedPreferences prefs = Util.getPreferences(context);
- int lastVersion = prefs.getInt(Constants.LAST_VERSION, 372);
- if(version > lastVersion) {
+ int lastVersion = prefs.getInt(Constants.LAST_VERSION, 0);
+ if(lastVersion == 0) {
+ SharedPreferences.Editor editor = prefs.edit();
+ editor.putInt(Constants.LAST_VERSION, version);
+ editor.commit();
+ }
+ else if(version > lastVersion) {
SharedPreferences.Editor editor = prefs.edit();
editor.putInt(Constants.LAST_VERSION, version);
editor.commit();
|