Risolto bug di session ID nel caso si recupera un collo
This commit is contained in:
parent
6a32771164
commit
446572c2ee
@ -402,8 +402,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
if(thereIsAnOpenedUL()) {
|
if(thereIsAnOpenedUL()) {
|
||||||
|
|
||||||
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting),
|
final ProgressDialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
mContext.getText(R.string.loading) + " ...", true);
|
|
||||||
|
|
||||||
if (thereIsAnyRowInUL()) {
|
if (thereIsAnyRowInUL()) {
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
|
|||||||
|
|
||||||
public class MainVenditaFragment extends Fragment implements ITitledFragment, IScrollableFragment, ISelectAllFragment, IFilterableFragment {
|
public class MainVenditaFragment extends Fragment implements ITitledFragment, IScrollableFragment, ISelectAllFragment, IFilterableFragment {
|
||||||
|
|
||||||
private static WaterfallToolbar mWaterfallToolbar;
|
private WaterfallToolbar mWaterfallToolbar;
|
||||||
|
|
||||||
private VenditaHelper mHelper;
|
private VenditaHelper mHelper;
|
||||||
private FragmentMainVenditaBinding mBinding = null;
|
private FragmentMainVenditaBinding mBinding = null;
|
||||||
|
|||||||
@ -296,7 +296,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mtbColtSessionID = ColliDataRecover.startNewSession(recoveredMtbColt);
|
||||||
setULToCurrentContext(recoveredMtbColt);
|
setULToCurrentContext(recoveredMtbColt);
|
||||||
refreshOrderBy(false);
|
refreshOrderBy(false);
|
||||||
}
|
}
|
||||||
@ -710,7 +710,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
if(thereIsAnyRowInUL()) {
|
if(thereIsAnyRowInUL()) {
|
||||||
updateDataFine(progress, () -> distribuisciCollo(progress, (generatedMtbColts) -> printCollo(progress, generatedMtbColts)));
|
updateDataFine(progress, () -> distribuisciCollo(progress, (generatedMtbColts) -> printCollo(progress, generatedMtbColts)));
|
||||||
} else {
|
} else {
|
||||||
ColliDataRecover.closeSession(mtbColtSessionID);
|
if(mtbColtSessionID != null) ColliDataRecover.closeSession(mtbColtSessionID);
|
||||||
deleteCollo(progress);
|
deleteCollo(progress);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -745,7 +745,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
|
|
||||||
ColliMagazzinoRESTConsumer.distribuisciCollo(cloneMtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
ColliMagazzinoRESTConsumer.distribuisciCollo(cloneMtbColt, SettingsManager.iDB().getDefaultCriterioDistribuzione(),
|
||||||
mtbColts -> {
|
mtbColts -> {
|
||||||
ColliDataRecover.closeSession(mtbColtSessionID);
|
if(mtbColtSessionID != null) ColliDataRecover.closeSession(mtbColtSessionID);
|
||||||
onComplete.run(mtbColts);
|
onComplete.run(mtbColts);
|
||||||
},
|
},
|
||||||
ex -> UtilityExceptions.defaultException(mActivity, ex, progress));
|
ex -> UtilityExceptions.defaultException(mActivity, ex, progress));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user