Don't show confirmation dialog for settings wizard

This commit is contained in:
serso 2016-03-27 13:43:25 +02:00
parent 456c8e5575
commit b1ec55c3ba

View File

@ -8,22 +8,10 @@ import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import com.viewpagerindicator.PageIndicator; import com.viewpagerindicator.PageIndicator;
import org.solovyev.android.calculator.*;
import org.solovyev.android.calculator.App;
import org.solovyev.android.calculator.AppComponent;
import org.solovyev.android.calculator.BaseActivity;
import org.solovyev.android.calculator.Preferences;
import org.solovyev.android.calculator.R;
import org.solovyev.android.calculator.language.Languages; import org.solovyev.android.calculator.language.Languages;
import org.solovyev.android.wizard.ListWizardFlow; import org.solovyev.android.wizard.*;
import org.solovyev.android.wizard.Wizard;
import org.solovyev.android.wizard.WizardFlow;
import org.solovyev.android.wizard.WizardStep;
import org.solovyev.android.wizard.WizardUi;
import org.solovyev.android.wizard.Wizards;
import org.solovyev.android.wizard.WizardsAware;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -40,7 +28,7 @@ public class WizardActivity extends BaseActivity implements WizardsAware, Shared
private WizardPagerAdapter pagerAdapter; private WizardPagerAdapter pagerAdapter;
@Nullable @Nullable
private AlertDialog dialog; private AlertDialog dialog;
@Inject @Inject
SharedPreferences preferences; SharedPreferences preferences;
@Inject @Inject
@ -124,7 +112,8 @@ public class WizardActivity extends BaseActivity implements WizardsAware, Shared
} }
public void finishWizardAbruptly() { public void finishWizardAbruptly() {
final boolean confirmed = wizardUi.getWizard().getName().equals(CalculatorWizards.RELEASE_NOTES); final String wizardName = wizardUi.getWizard().getName();
final boolean confirmed = wizardName.equals(CalculatorWizards.RELEASE_NOTES) || wizardName.equals(CalculatorWizards.DEFAULT_WIZARD_FLOW);
finishWizardAbruptly(confirmed); finishWizardAbruptly(confirmed);
} }