Probabile fix per popup caricamento in PVOrdineAcquistoEditActivity
This commit is contained in:
parent
b95863d66d
commit
4b1632c265
@ -255,8 +255,7 @@ public class PVOrdineAcquistoEditActivity extends BaseActivity implements PVOrdi
|
||||
DialogSimpleMessageView.makeInfoDialog(getText(R.string.warning).toString(),
|
||||
Html.fromHtml(getResources().getString(R.string.confirm_export_invalid_product)),
|
||||
null,
|
||||
onConfirm
|
||||
,
|
||||
onConfirm,
|
||||
this::onLoadingEnded).show(getSupportFragmentManager(), "confirmExportInvalidProducts");
|
||||
}
|
||||
|
||||
|
||||
@ -157,9 +157,10 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
}
|
||||
|
||||
public void processBarcode(String barcode) {
|
||||
try {
|
||||
this.sendOnLoadingStarted();
|
||||
Runnable onComplete = BarcodeManager::enable;
|
||||
BarcodeManager.disable();
|
||||
|
||||
try {
|
||||
List<ArticoloOrdinabileDTO> listArticoli = matchArticoliForBarcode(barcode);
|
||||
if (listArticoli == null || listArticoli.isEmpty()) {
|
||||
if (SettingsManager.iDB().isFlagConsentiFuoriPianoLogistico() && UtilityString.isNullOrEmpty(mCurrentOrdine.getCodAlis())) {
|
||||
@ -172,20 +173,20 @@ public class PVOrdineAcquistoEditViewModel {
|
||||
if (listArticoli.size() == 1) {
|
||||
this.addArticoloToOrdine(
|
||||
listArticoli.get(0),
|
||||
this::sendOnLoadingEnded,
|
||||
onComplete,
|
||||
this::sendError
|
||||
);
|
||||
} else {
|
||||
this.mListener.chooseArtFromList(listArticoli, (art) -> {
|
||||
this.addArticoloToOrdine(
|
||||
art,
|
||||
this::sendOnLoadingEnded,
|
||||
onComplete,
|
||||
this::sendError);
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.sendError(e);
|
||||
BarcodeManager.enable();
|
||||
onComplete.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user