瀏覽代碼

Merge pull request #2965 from nextcloud/showWhatsNewOnlyOnUpgrade

Show whats new screen only on update
Tobias Kaminsky 6 年之前
父節點
當前提交
681be2bad5

+ 7 - 0
src/main/java/com/owncloud/android/ui/activity/FirstRunActivity.java

@@ -163,6 +163,13 @@ public class FirstRunActivity extends BaseActivity implements ViewPager.OnPageCh
         PreferenceManager.setLastSeenVersionCode(this, MainApp.getVersionCode());
     }
 
+    @Override
+    protected void onStop() {
+        onFinish();
+
+        super.onStop();
+    }
+
     private static boolean isFirstRun(Context context) {
         return AccountUtils.getCurrentOwnCloudAccount(context) == null;
     }

+ 2 - 3
src/main/java/com/owncloud/android/ui/activity/WhatsNewActivity.java

@@ -139,8 +139,7 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
     }
 
     public static void runIfNeeded(Context context) {
-        if (!context.getResources().getBoolean(R.bool.show_whats_new)
-                || context instanceof WhatsNewActivity) {
+        if (!context.getResources().getBoolean(R.bool.show_whats_new) || context instanceof WhatsNewActivity) {
             return;
         }
 
@@ -174,7 +173,7 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
     }
 
     static private FeatureItem[] getWhatsNew(Context context) {
-        int itemVersionCode = 30030000;
+        int itemVersionCode = 30030099;
 
         if (!isFirstRun(context) && MainApp.getVersionCode() >= itemVersionCode
                 && PreferenceManager.getLastSeenVersionCode(context) < itemVersionCode) {