From 23d0e8b7b74bc80ce7e6d57a74ab915285324b52 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Thu, 9 May 2013 14:11:36 -0600 Subject: Don't run old updates for new users --- .../src/github/daneren2005/dsub/updates/Updater.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'subsonic-android') 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(); -- cgit v1.2.3