Fix su dismiss del DialogInputQuantity
This commit is contained in:
parent
67571e3d7a
commit
dd9789c4f3
@ -87,6 +87,7 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
|
||||
private int mBarcodeScannerIstanceID;
|
||||
private boolean mFirstStart = true;
|
||||
private boolean mAbort = true;
|
||||
|
||||
|
||||
public DialogInputQuantityV2View setDialogInputQuantityV2DTO(DialogInputQuantityV2DTO mDialogInputQuantityV2DTO) {
|
||||
@ -184,22 +185,25 @@ public class DialogInputQuantityV2View extends BaseDialogFragment implements Dia
|
||||
|
||||
public void save() {
|
||||
if (this.mViewModel.validate()) {
|
||||
this.mOnComplete.run(this.mViewModel.getResult(), false);
|
||||
this.mAbort = false;
|
||||
dismiss();
|
||||
this.mOnComplete.run(this.mViewModel.getResult(), false);
|
||||
}
|
||||
}
|
||||
|
||||
public void saveAndCloseLU() {
|
||||
if (this.mViewModel.validate()) {
|
||||
this.mOnComplete.run(this.mViewModel.getResult(), true);
|
||||
this.mAbort = false;
|
||||
dismiss();
|
||||
this.mOnComplete.run(this.mViewModel.getResult(), true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(@NonNull DialogInterface dialog) {
|
||||
|
||||
BarcodeManager.removeCallback(mBarcodeScannerIstanceID);
|
||||
this.mOnAbort.run();
|
||||
if(mAbort) this.mOnAbort.run();
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user