Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
016be4799c
@ -6,8 +6,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 247
|
||||
def appVersionName = '1.20.0'
|
||||
def appVersionCode = 249
|
||||
def appVersionName = '1.20.2'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
|
||||
@ -22,8 +22,6 @@ public abstract class BaseFragment extends Fragment {
|
||||
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
|
||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||
mToolbar = toolbar;
|
||||
}
|
||||
@ -34,10 +32,6 @@ public abstract class BaseFragment extends Fragment {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void onLoadingStarted() {
|
||||
new Thread(() -> {
|
||||
BarcodeManager.disable();
|
||||
@ -88,6 +82,8 @@ public abstract class BaseFragment extends Fragment {
|
||||
}
|
||||
|
||||
protected void popMe() {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
((IPoppableActivity) requireActivity()).pop();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
|
||||
List<FilterChipDTO> filterList = Stream.of(OrdiniUscitaElencoBindings.AVAILABLE_FILTERS.entrySet()).map(Map.Entry::getValue).sortBy(FilterChipDTO::getPosizione).toList();
|
||||
|
||||
for (FilterChipDTO filterChipDTO : filterList){
|
||||
for (FilterChipDTO filterChipDTO : filterList) {
|
||||
|
||||
FilterChipView filterChipView = new FilterChipView(
|
||||
requireActivity(),
|
||||
@ -697,7 +697,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
|
||||
//new Thread(() -> {
|
||||
|
||||
// requireActivity().runOnUiThread(() -> {
|
||||
requireActivity().runOnUiThread(() -> {
|
||||
List<OrdiniUscitaElencoDTO> tmpList;
|
||||
|
||||
if (filteredList != null) {
|
||||
@ -716,9 +716,10 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
|
||||
fabVisible.set(Stream.of(mOrdiniInevasiMutableData)
|
||||
.anyMatch(y -> y.getSelectedObservable().get()));
|
||||
// });
|
||||
|
||||
this.onLoadingEnded();
|
||||
});
|
||||
|
||||
//}).start();
|
||||
|
||||
}
|
||||
@ -831,7 +832,6 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||
this.mOnPreDestroyList.add(onPreDestroy);
|
||||
|
||||
@ -325,6 +325,12 @@ public class ProdVersamentoMaterialeFragment extends BaseFragment implements Pro
|
||||
this.openLU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex, boolean requestClose) {
|
||||
super.onError(ex);
|
||||
if(requestClose) popMe();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWarning(String warningText, Runnable action) {
|
||||
this.requireActivity().runOnUiThread(() -> {
|
||||
|
||||
@ -77,8 +77,13 @@ public class ProdVersamentoMaterialeViewModel {
|
||||
mtbDepoPosizione.getPosizione(),
|
||||
getIdMaterialeFromCollo(mtbColt),
|
||||
ordini -> {
|
||||
if(ordini == null || ordini.isEmpty())
|
||||
this.sendError(new Exception("Nessun ordine compatibile con " + getIdMaterialeFromCollo(mtbColt) + " sulla linea " + mtbDepoPosizione.getPosizione()), true);
|
||||
else {
|
||||
setCurrentOrders(ordini, mtbColt.getMtbColr().get(0));
|
||||
this.sendOnLoadingEnded();
|
||||
}
|
||||
|
||||
},
|
||||
e -> this.sendWarning(e.getMessage(), this::sendRequestLUOpen));
|
||||
}
|
||||
@ -194,7 +199,11 @@ public class ProdVersamentoMaterialeViewModel {
|
||||
}
|
||||
|
||||
private void sendError(Exception ex) {
|
||||
if (this.mListener != null) mListener.onError(ex);
|
||||
if (this.mListener != null) mListener.onError(ex, false);
|
||||
}
|
||||
|
||||
private void sendError(Exception ex, boolean requestClose) {
|
||||
if (this.mListener != null) mListener.onError(ex, requestClose);
|
||||
}
|
||||
|
||||
private void sendOnDataSaved() {
|
||||
@ -205,7 +214,7 @@ public class ProdVersamentoMaterialeViewModel {
|
||||
|
||||
void requestLUOpen();
|
||||
|
||||
void onError(Exception ex);
|
||||
void onError(Exception ex, boolean requestClose);
|
||||
|
||||
void onWarning(String warningText, Runnable action);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user