Finish v1.44.01(470)
This commit is contained in:
commit
95d73b5bc5
@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
android {
|
||||
|
||||
def appVersionCode = 469
|
||||
def appVersionName = '1.44.00'
|
||||
def appVersionCode = 470
|
||||
def appVersionName = '1.44.01'
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
@ -189,6 +189,8 @@ dependencies {
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
|
||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
|
||||
//Barcode generator
|
||||
implementation group: 'com.google.zxing', name: 'core', version: '3.5.3'
|
||||
}
|
||||
|
||||
@ -41,7 +41,6 @@ public class MainContext {
|
||||
}
|
||||
|
||||
public void init() {
|
||||
|
||||
try {
|
||||
BarcodeManager.init(applicationContext);
|
||||
} catch (Exception exception) {
|
||||
@ -50,21 +49,33 @@ public class MainContext {
|
||||
|
||||
|
||||
//this.initAuthSession(() -> {
|
||||
this.initDeviceId(() -> {
|
||||
this.initDBData(() -> {
|
||||
this.initMenu(() -> {
|
||||
this.initDeviceId(() -> {
|
||||
this.initDBData(() -> {
|
||||
this.initMenu(() -> {
|
||||
|
||||
if (mListener != null) mListener.onContextInitialized();
|
||||
});
|
||||
if (mListener != null) mListener.onContextInitialized();
|
||||
});
|
||||
});
|
||||
});
|
||||
//});
|
||||
|
||||
|
||||
this.initServerStatusChecker();
|
||||
|
||||
// EventBus.getDefault().register(this);
|
||||
}
|
||||
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// public void onSessionExpired(SessionExpiredEvent event) {
|
||||
// DialogSimpleMessageView.makeErrorDialog(
|
||||
// new SpannedString("La sessione è scaduta. Effettua nuovamente la login"),
|
||||
// null,
|
||||
// () -> {
|
||||
// logout(MainApplication::exit);
|
||||
// })
|
||||
// .show(activity.getSupportFragmentManager(), "expired-session-error");
|
||||
// }
|
||||
|
||||
|
||||
private void initAuthSession(Runnable onComplete) {
|
||||
this.authenticationRESTConsumer.me(obj -> {
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
package it.integry.integrywmsnative.core.event;
|
||||
|
||||
public class SessionExpiredEvent {
|
||||
}
|
||||
@ -2,10 +2,14 @@ package it.integry.integrywmsnative.core.rest;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import io.jsonwebtoken.Claims;
|
||||
import it.integry.integrywmsnative.core.authentication.JwtUtils;
|
||||
import it.integry.integrywmsnative.core.event.SessionExpiredEvent;
|
||||
import it.integry.integrywmsnative.core.exception.UnauthorizedAccessException;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||
import it.integry.integrywmsnative.gest.login.rest.RefreshRESTConsumer;
|
||||
@ -25,7 +29,7 @@ public class AuthInterceptor implements Interceptor {
|
||||
public Response intercept(@NonNull Chain chain) throws IOException {
|
||||
var originalRequest = chain.request();
|
||||
|
||||
if(SettingsManager.i().getUserSession() != null) {
|
||||
if (SettingsManager.i().getUserSession() != null) {
|
||||
|
||||
var accessToken = SettingsManager.i().getUserSession().getAccessToken();
|
||||
var accessTokenExpiryDate = SettingsManager.i().getUserSession().getAccessTokenExpiryDate();
|
||||
@ -45,6 +49,8 @@ public class AuthInterceptor implements Interceptor {
|
||||
.setRefreshTokenExpiryDate(response.getExpiryDate());
|
||||
|
||||
SettingsManager.update();
|
||||
} catch (UnauthorizedAccessException uae) {
|
||||
//Globally managed
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -61,4 +67,11 @@ public class AuthInterceptor implements Interceptor {
|
||||
} else
|
||||
return chain.proceed(originalRequest);
|
||||
}
|
||||
|
||||
|
||||
private void notifySessionExpired() {
|
||||
EventBus.getDefault().post(new SessionExpiredEvent());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -106,10 +106,9 @@ public class AccettazioneBollaPickingViewModel {
|
||||
this.mBolle = bolle;
|
||||
this.mUseQtaBolla = useQtaOrd;
|
||||
|
||||
List<SitBollaAccettazioneDTO> mSitArts = Stream.of(sitArts)
|
||||
.filter(x ->
|
||||
UtilityBigDecimal.greaterThan(x.getQtaDaAccettare(), BigDecimal.ZERO))
|
||||
.toList();
|
||||
List<SitBollaAccettazioneDTO> mSitArts = sitArts.stream()
|
||||
.filter(x -> UtilityBigDecimal.greaterThan(x.getQtaDaAccettare(), BigDecimal.ZERO))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
getEmptyPickingList(mSitArts, this.mPickingList::postValue);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user