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 {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 247
|
def appVersionCode = 249
|
||||||
def appVersionName = '1.20.0'
|
def appVersionName = '1.20.2'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -22,8 +22,6 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
protected final List<Runnable> mOnPreDestroyList = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
public void setScrollToolbar(ElevatedToolbar toolbar) {
|
||||||
mToolbar = toolbar;
|
mToolbar = toolbar;
|
||||||
}
|
}
|
||||||
@ -34,10 +32,6 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void onLoadingStarted() {
|
public void onLoadingStarted() {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
@ -88,6 +82,8 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void popMe() {
|
protected void popMe() {
|
||||||
|
getActivity().runOnUiThread(() -> {
|
||||||
((IPoppableActivity) requireActivity()).pop();
|
((IPoppableActivity) requireActivity()).pop();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -697,7 +697,7 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
|
|
||||||
//new Thread(() -> {
|
//new Thread(() -> {
|
||||||
|
|
||||||
// requireActivity().runOnUiThread(() -> {
|
requireActivity().runOnUiThread(() -> {
|
||||||
List<OrdiniUscitaElencoDTO> tmpList;
|
List<OrdiniUscitaElencoDTO> tmpList;
|
||||||
|
|
||||||
if (filteredList != null) {
|
if (filteredList != null) {
|
||||||
@ -716,9 +716,10 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
|
|
||||||
fabVisible.set(Stream.of(mOrdiniInevasiMutableData)
|
fabVisible.set(Stream.of(mOrdiniInevasiMutableData)
|
||||||
.anyMatch(y -> y.getSelectedObservable().get()));
|
.anyMatch(y -> y.getSelectedObservable().get()));
|
||||||
// });
|
|
||||||
|
|
||||||
this.onLoadingEnded();
|
this.onLoadingEnded();
|
||||||
|
});
|
||||||
|
|
||||||
//}).start();
|
//}).start();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -831,7 +832,6 @@ public class OrdiniUscitaElencoFragment extends BaseFragment implements ITitledF
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addOnPreDestroy(Runnable onPreDestroy) {
|
public void addOnPreDestroy(Runnable onPreDestroy) {
|
||||||
this.mOnPreDestroyList.add(onPreDestroy);
|
this.mOnPreDestroyList.add(onPreDestroy);
|
||||||
|
|||||||
@ -325,6 +325,12 @@ public class ProdVersamentoMaterialeFragment extends BaseFragment implements Pro
|
|||||||
this.openLU();
|
this.openLU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Exception ex, boolean requestClose) {
|
||||||
|
super.onError(ex);
|
||||||
|
if(requestClose) popMe();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onWarning(String warningText, Runnable action) {
|
public void onWarning(String warningText, Runnable action) {
|
||||||
this.requireActivity().runOnUiThread(() -> {
|
this.requireActivity().runOnUiThread(() -> {
|
||||||
|
|||||||
@ -77,8 +77,13 @@ public class ProdVersamentoMaterialeViewModel {
|
|||||||
mtbDepoPosizione.getPosizione(),
|
mtbDepoPosizione.getPosizione(),
|
||||||
getIdMaterialeFromCollo(mtbColt),
|
getIdMaterialeFromCollo(mtbColt),
|
||||||
ordini -> {
|
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));
|
setCurrentOrders(ordini, mtbColt.getMtbColr().get(0));
|
||||||
this.sendOnLoadingEnded();
|
this.sendOnLoadingEnded();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
e -> this.sendWarning(e.getMessage(), this::sendRequestLUOpen));
|
e -> this.sendWarning(e.getMessage(), this::sendRequestLUOpen));
|
||||||
}
|
}
|
||||||
@ -194,7 +199,11 @@ public class ProdVersamentoMaterialeViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void sendError(Exception ex) {
|
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() {
|
private void sendOnDataSaved() {
|
||||||
@ -205,7 +214,7 @@ public class ProdVersamentoMaterialeViewModel {
|
|||||||
|
|
||||||
void requestLUOpen();
|
void requestLUOpen();
|
||||||
|
|
||||||
void onError(Exception ex);
|
void onError(Exception ex, boolean requestClose);
|
||||||
|
|
||||||
void onWarning(String warningText, Runnable action);
|
void onWarning(String warningText, Runnable action);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user