Skip to content

Commit

Permalink
Include flag to enable or disable the wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
davigonz committed Feb 21, 2018
1 parent d3d2273 commit 250f063
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions res/values/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<bool name="feedback_enabled">true</bool>
<bool name="logger_enabled">false</bool>
<bool name="privacy_policy_enabled">true</bool>
<bool name="wizard_enabled">true</bool>
<string name="url_privacy_policy" formatted="false">https://owncloud.com/privacy-legal/</string>
<string name="url_help" formatted="false">http://owncloud.com/mobile/help</string>
<string name="url_imprint" formatted="false"></string>
Expand Down
6 changes: 4 additions & 2 deletions src/com/owncloud/android/ui/activity/WhatsNewActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,14 @@ static public void runIfNeeded(Context context) {

static private boolean shouldShow(Context context) {
boolean isBeta = BuildConfig.BUILD_TYPE.equals(MainApp.BUILD_TYPE_BETA);
return (isFirstRun() && context instanceof AccountAuthenticatorActivity) ||
boolean showWizard = context.getResources().getBoolean(R.bool.wizard_enabled);
return showWizard &&
((isFirstRun() && context instanceof AccountAuthenticatorActivity) ||
(
!(isFirstRun() && (context instanceof FileDisplayActivity)) &&
!(context instanceof PassCodeActivity) &&
(FeatureList.getFiltered(getLastSeenVersionCode(), isFirstRun(), isBeta).length > 0)
);
));
}

@Override
Expand Down

0 comments on commit 250f063

Please sign in to comment.