Skip to content

Commit

Permalink
Revert "Added dismissAfterConfirm flag."
Browse files Browse the repository at this point in the history
This reverts commit 8817437.
  • Loading branch information
jd-alexander committed Aug 29, 2019
1 parent acf156e commit 97fe60b
Showing 1 changed file with 1 addition and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ public class FullScreenDialogFragment extends DialogFragment {
private String mTitle;
private Toolbar mToolbar;
private boolean mHideActivityBar;
private boolean mDismissAfterConfirm;
private int mToolbarColor;

private static final String ARG_ACTION = "ARG_ACTION";
private static final String ARG_HIDE_ACTIVITY_BAR = "ARG_HIDE_ACTIVITY_BAR";
private static final String ARG_DISMISS_AFTER_CONFIRM = "ARG_DISMISS_AFTER_CONFIRM";
private static final String ARG_SUBTITLE = "ARG_SUBTITLE";
private static final String ARG_TITLE = "ARG_TITLE";
private static final String ARG_TOOLBAR_COLOR = "ARG_TOOLBAR_COLOR";
Expand Down Expand Up @@ -92,7 +90,6 @@ protected static FullScreenDialogFragment newInstance(Builder builder) {
dialog.setOnConfirmListener(builder.mOnConfirmListener);
dialog.setOnDismissListener(builder.mOnDismissListener);
dialog.setHideActivityBar(builder.mHideActivityBar);
dialog.setDismissAfterConfirm(builder.mDismissAfterConfirm);
return dialog;
}

Expand All @@ -103,7 +100,6 @@ private static Bundle setArguments(Builder builder) {
bundle.putString(ARG_SUBTITLE, builder.mSubtitle);
bundle.putInt(ARG_TOOLBAR_COLOR, builder.mToolbarColor);
bundle.putBoolean(ARG_HIDE_ACTIVITY_BAR, builder.mHideActivityBar);
bundle.putBoolean(ARG_DISMISS_AFTER_CONFIRM, builder.mDismissAfterConfirm);
return bundle;
}

Expand Down Expand Up @@ -220,9 +216,7 @@ protected void confirm(Bundle result) {
mOnConfirmListener.onConfirm(result);
}

if (mDismissAfterConfirm) {
dismiss();
}
dismiss();
}

/**
Expand Down Expand Up @@ -259,7 +253,6 @@ private void initBuilderArguments() {
mSubtitle = bundle.getString(ARG_SUBTITLE);
mToolbarColor = bundle.getInt(ARG_TOOLBAR_COLOR);
mHideActivityBar = bundle.getBoolean(ARG_HIDE_ACTIVITY_BAR);
mDismissAfterConfirm = bundle.getBoolean(ARG_DISMISS_AFTER_CONFIRM);
}

/**
Expand Down Expand Up @@ -382,15 +375,6 @@ public void setSubtitle(@StringRes int textId) {
}
}

/**
* Set flag to dismiss fragment after confirm action is clicked.
*
* @param dismissAfterConfirm boolean to dismiss after confirm click.
*/
public void setDismissAfterConfirm(boolean dismissAfterConfirm) {
mDismissAfterConfirm = dismissAfterConfirm;
}

/**
* Set theme background for {@link FullScreenDialogFragment} view.
*
Expand Down Expand Up @@ -437,7 +421,6 @@ public static class Builder {
String mSubtitle = "";
String mTitle = "";
boolean mHideActivityBar = false;
boolean mDismissAfterConfirm = true;
int mToolbarColor = R.color.primary;

/**
Expand Down Expand Up @@ -509,17 +492,6 @@ public Builder setHideActivityBar(boolean hide) {
return this;
}

/**
* Set flag to dismiss the fragment after confirm action is clicked.
*
* @param dismiss boolean to dismiss the fragment after confirm click.
* @return {@link Builder} object to allow for chaining of calls to set methods
*/
public Builder setDismissAferConfirm(boolean dismiss) {
this.mDismissAfterConfirm = dismiss;
return this;
}

/**
* Set {@link FullScreenDialogFragment} subtitle text.
*
Expand Down

0 comments on commit 97fe60b

Please sign in to comment.