Finish v1.34.01(385)
This commit is contained in:
commit
8237466adf
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 384
|
def appVersionCode = 385
|
||||||
def appVersionName = '1.34.00'
|
def appVersionName = '1.34.01'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package it.integry.integrywmsnative;
|
|||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
|
||||||
|
|
||||||
import androidx.core.os.HandlerCompat;
|
import androidx.core.os.HandlerCompat;
|
||||||
|
|
||||||
@ -72,7 +71,7 @@ public class MainApplicationModule {
|
|||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
public Handler providesMainThreadHandler() {
|
public Handler providesMainThreadHandler() {
|
||||||
return HandlerCompat.createAsync(Looper.getMainLooper());
|
return HandlerCompat.createAsync(mApplication.getApplicationContext().getMainLooper());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
|||||||
@ -66,12 +66,15 @@ public class InventarioRepository extends _BaseRepository<MtbInvent, InventarioR
|
|||||||
|
|
||||||
if (remoteData == null) remoteData = new ArrayList<>();
|
if (remoteData == null) remoteData = new ArrayList<>();
|
||||||
|
|
||||||
resolveFetch(remoteData, internalLiveData.getValue(),
|
List<MtbInvent> finalRemoteData = remoteData;
|
||||||
|
|
||||||
|
resolveFetch(finalRemoteData, internalLiveData.getValue(),
|
||||||
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
(remoteItem, localItem) -> Objects.equals(remoteItem.getIdInventario(), localItem.getIdInventario()),
|
||||||
(remoteItem, localItem) -> {
|
(remoteItem, localItem) -> {
|
||||||
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
remoteItem.setRemoteSyncDate(localItem.getRemoteSyncDate());
|
||||||
remoteItem.setNew(false);
|
remoteItem.setNew(false);
|
||||||
}, onComplete, onError);
|
}, () -> handler.post(onComplete), ex -> handler.post(() -> onError.run(ex)));
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
onError.run(e);
|
onError.run(e);
|
||||||
|
|||||||
@ -31,9 +31,9 @@ public class UtilityExceptions {
|
|||||||
public static void defaultException(Context context, Exception ex, boolean sendEmail) {
|
public static void defaultException(Context context, Exception ex, boolean sendEmail) {
|
||||||
|
|
||||||
if (ex.getMessage() != null) {
|
if (ex.getMessage() != null) {
|
||||||
Logger.e(ex, Html.fromHtml(ex.getMessage()).toString());
|
Logger.e(ex, Html.fromHtml(ex.getMessage()).toString(), ex.getStackTrace());
|
||||||
} else {
|
} else {
|
||||||
Logger.e(ex, "Errore");
|
Logger.e(ex, "Errore", ex.getStackTrace());
|
||||||
}
|
}
|
||||||
|
|
||||||
String errorMessage = CommonRESTException.tryRecognizeThenGetMessage(ex);
|
String errorMessage = CommonRESTException.tryRecognizeThenGetMessage(ex);
|
||||||
|
|||||||
@ -95,6 +95,7 @@ public class SpedizioneViewModel {
|
|||||||
|
|
||||||
private Listener mListener;
|
private Listener mListener;
|
||||||
|
|
||||||
|
private String mDefaultRagSocOfUL = null;
|
||||||
private GestioneEnum mDefaultGestioneOfUL = null;
|
private GestioneEnum mDefaultGestioneOfUL = null;
|
||||||
private int mDefaultSegnoCol = -1;
|
private int mDefaultSegnoCol = -1;
|
||||||
private String mDefaultCodMdep = null;
|
private String mDefaultCodMdep = null;
|
||||||
@ -205,6 +206,12 @@ public class SpedizioneViewModel {
|
|||||||
private void initDefaultVars() {
|
private void initDefaultVars() {
|
||||||
if (this.mTestateOrdini != null && this.mTestateOrdini.size() > 0) {
|
if (this.mTestateOrdini != null && this.mTestateOrdini.size() > 0) {
|
||||||
|
|
||||||
|
List<String> foundRagSoc = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getRagSocOrd).distinctBy(x -> x).toList();
|
||||||
|
|
||||||
|
if (foundRagSoc != null && foundRagSoc.size() == 1) {
|
||||||
|
mDefaultRagSocOfUL = foundRagSoc.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (mDefaultGestioneOfUL == null) {
|
if (mDefaultGestioneOfUL == null) {
|
||||||
//Definizione della gestione collo di default
|
//Definizione della gestione collo di default
|
||||||
List<GestioneEnum> foundGestioni = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getGestioneEnum).withoutNulls().distinct().toList();
|
List<GestioneEnum> foundGestioni = Stream.of(mTestateOrdini).map(OrdineUscitaInevasoDTO::getGestioneEnum).withoutNulls().distinct().toList();
|
||||||
@ -1230,6 +1237,7 @@ public class SpedizioneViewModel {
|
|||||||
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(createdUDS, mTestateOrdini);
|
mMtbColtSessionID = this.mColliDataRecoverService.startNewSession(createdUDS, mTestateOrdini);
|
||||||
|
|
||||||
this.mCurrentMtbColt = createdUDS;
|
this.mCurrentMtbColt = createdUDS;
|
||||||
|
this.mCurrentMtbColt.setRagSocCliente(mDefaultRagSocOfUL);
|
||||||
this.mIsNewLU = true;
|
this.mIsNewLU = true;
|
||||||
|
|
||||||
if (onComplete != null) onComplete.run();
|
if (onComplete != null) onComplete.run();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user