From cf3e7cf082127519cd16bdf48bd1ccecf47579b9 Mon Sep 17 00:00:00 2001 From: Fup Duck Date: Thu, 11 Jan 2018 15:55:54 +0100 Subject: save app version on first start --- app/src/main/java/se/leap/bitmaskclient/StartActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/StartActivity.java') diff --git a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java index 2bfe650a..ec972a75 100644 --- a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java @@ -48,6 +48,7 @@ public class StartActivity extends Activity { break; case FIRST: + storeAppVersion(); // TODO start ProfileCreation & replace below code break; @@ -120,7 +121,7 @@ public class StartActivity extends Activity { } // ensure all upgrades have passed before storing new information - preferences.edit().putInt(Constants.PREFERENCES_APP_VERSION, versionCode).apply(); + storeAppVersion(); } /** @@ -132,4 +133,8 @@ public class StartActivity extends Activity { return previousVersionCode < featureVersionCode && versionCode >= featureVersionCode; } + private void storeAppVersion() { + preferences.edit().putInt(Constants.PREFERENCES_APP_VERSION, versionCode).apply(); + } + } -- cgit v1.2.3