Fix bug that caused the IFinalizeDialogFragmentListener to be called twice once the FinalizeDialogFragment is attached

This commit is contained in:
uykek 2020-06-30 21:13:14 +02:00
parent 360847f99d
commit 060b2c5740

View file

@ -71,7 +71,6 @@ public class CreateSudokuSpecialButtonLayout extends LinearLayout implements IHi
break; break;
case Finalize: case Finalize:
FinalizeConfirmationDialog dialog = new FinalizeConfirmationDialog(); FinalizeConfirmationDialog dialog = new FinalizeConfirmationDialog();
dialog.addListener(finalizeDialogFragmentListener);
dialog.show(fragmentManager, "FinalizeDialogFragment"); dialog.show(fragmentManager, "FinalizeDialogFragment");
default: default:
break; break;
@ -203,10 +202,6 @@ public class CreateSudokuSpecialButtonLayout extends LinearLayout implements IHi
} }
} }
public void addListener(IFinalizeDialogFragmentListener listener) {
listeners.add(listener);
}
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use the Builder class for convenient dialog construction // Use the Builder class for convenient dialog construction