Compare commits

...

8 Commits

Author SHA1 Message Date
385a28c29b Finish v1.41.08(456) 2024-11-21 18:34:09 +01:00
191953a003 -> v1.41.08 (456) 2024-11-21 18:34:04 +01:00
47143fe97d Fix sul caricamento degli ordini di acquisto 2024-11-21 18:33:20 +01:00
387ce6a555 Finish v1.41.07(455) 2024-11-18 18:31:49 +01:00
47ff01805c Finish v1.41.07(455) 2024-11-18 18:31:48 +01:00
0e24f7188c -> v1.41.07 (455) 2024-11-18 18:31:43 +01:00
8b3d1f2a2e Ulteriori fix su DialogProgressView 2024-11-18 18:31:01 +01:00
dcdc823b5f Finish v1.41.06(454) 2024-11-18 16:36:52 +01:00
9 changed files with 33 additions and 38 deletions

View File

@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 454
def appVersionName = '1.41.06'
def appVersionCode = 456
def appVersionName = '1.41.08'
signingConfigs {
release {

View File

@@ -53,16 +53,16 @@ public class BaseActivity extends AppCompatActivity {
private void openProgress() {
BarcodeManager.disable();
executorService.execute(() -> {
//executorService.execute(() -> {
this.mCurrentProgress.show(getSupportFragmentManager());
});
//});
}
private void closeProgress() {
BarcodeManager.enable();
executorService.execute(() -> {
//executorService.execute(() -> {
mCurrentProgress.dismiss();
});
//});
}
@Override

View File

@@ -77,22 +77,23 @@ public abstract class BaseDialogFragment extends DialogFragment implements Dialo
private void openProgress() {
BarcodeManager.disable();
executorService.execute(() -> {
// executorService.execute(() -> {
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
});
// });
}
private void closeProgress() {
BarcodeManager.enable();
executorService.execute(() -> {
// executorService.execute(() -> {
mCurrentProgress.dismiss();
});
// });
}
public void onError(Exception ex) {
this.onLoadingEnded();
requireActivity().runOnUiThread(() -> {
this.onLoadingEnded();
UtilityExceptions.defaultException(requireActivity(), ex);
});
}

View File

@@ -66,16 +66,16 @@ public abstract class BaseFragment extends Fragment {
private void openProgress() {
BarcodeManager.disable();
executorService.execute(() -> {
// executorService.execute(() -> {
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
});
// });
}
private void closeProgress() {
BarcodeManager.enable();
executorService.execute(() -> {
// executorService.execute(() -> {
mCurrentProgress.dismiss();
});
// });
}
public void onError(Exception ex) {

View File

@@ -17,7 +17,6 @@ import it.integry.integrywmsnative.core.rest.RESTBuilder;
import it.integry.integrywmsnative.core.rest.model.ServiceRESTResponse;
import it.integry.integrywmsnative.core.utility.UtilityDate;
import it.integry.integrywmsnative.core.utility.UtilityLogger;
import it.integry.integrywmsnative.core.utility.UtilityThread;
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.ArtDTO;
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.OrdineDTO;
import it.integry.integrywmsnative.gest.contab_doc_interni.dto.SaveDTO;
@@ -42,17 +41,13 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
var startTime = new Date().getTime();
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
UtilityThread.executeParallel(() -> {
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
onSuccess.run(articoliOrdineWrapper);
}, false);
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
onSuccess.run(articoliOrdineWrapper);
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
Log.e("getArticoliListino_pv", t.toString());
UtilityLogger.error(new Exception(t));
onFailed.run(new Exception(t));
}
});
@@ -66,17 +61,13 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
public void onResponse(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Response<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> response) {
var startTime = new Date().getTime();
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
UtilityThread.executeParallel(() -> {
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
onSuccess.run(articoliOrdineWrapper);
}, false);
Log.d("LOADING TIME 1", "MS: " + (new Date().getTime() - startTime));
onSuccess.run(articoliOrdineWrapper);
}, onFailed);
}
@Override
public void onFailure(Call<ServiceRESTResponse<OrdiniAcquistoGrigliaDTO>> call, Throwable t) {
Log.e("getArticoliListino_pv", t.toString());
UtilityLogger.error(new Exception(t));
onFailed.run(new Exception(t));
}
});
@@ -105,7 +96,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
public void onResponse(Call<ServiceRESTResponse<Object>> call, Response<ServiceRESTResponse<Object>> response) {
var startTime = new Date().getTime();
analyzeAnswer(response, "retrieveArticoliOrdine", articoliOrdineWrapper -> {
UtilityThread.executeParallel(() -> {
// UtilityThread.executeParallel(() -> {
// if (data == null) {
// onFailed.run(new Exception("Nessun ordine generato"));
// return;
@@ -117,7 +108,7 @@ public class PVOrdiniAcquistoRESTConsumer extends _BaseRESTConsumer {
// ordine.setCodMdep(data.getCodMdep());
// ordine.setNumOrd(data.getNumOrd());
onSuccess.run(ordine);
}, false);
// }, false);
}, onFailed);
}

View File

@@ -130,8 +130,10 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
this.onLoadingStarted();
String codMdep = SettingsManager.i().getUserSession().getDepo().getCodMdep();
pvOrdiniAcquistoRESTConsumer.retrieveArticoli(codAlis, codMdep, dto -> {
this.onLoadingEnded();
if (dto.getArticoli().size() == 0) {
if (dto.getArticoli().isEmpty()) {
if (UtilityString.isNullOrEmpty(codAlis)) {
onFailed.run(new NoArtsFoundException());
} else {
@@ -146,6 +148,7 @@ public class DialogScanGrigliaAcquistoView extends BaseDialogFragment {
mGriglia.setDescrDepo(dto.getDescrDepo());
mListArticoli = dto.getArticoli();
this.dismiss();
}, onFailed);
}

View File

@@ -309,15 +309,15 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
private void openProgress() {
executorService.execute(() -> {
// executorService.execute(() -> {
this.mCurrentProgress.show(requireActivity().getSupportFragmentManager());
});
// });
}
private void closeProgress() {
executorService.execute(() -> {
// executorService.execute(() -> {
mCurrentProgress.dismiss();
});
// });
}

View File

@@ -64,7 +64,7 @@ public class DialogProgressView extends DialogFragment {
}
public void show(@NonNull FragmentManager manager) {
if (!isAdded() && !isInLayout()) {
if (!isAdded() && !isInLayout() && !progressOpened) {
this.progressOpened = true;
super.show(manager, "loading-dialog");
}
@@ -72,7 +72,7 @@ public class DialogProgressView extends DialogFragment {
@Override
public void dismiss() {
if (isAdded() || isInLayout()) {
if (isAdded() || isInLayout() || progressOpened) {
this.progressOpened = false;
super.dismissAllowingStateLoss();
}

View File

@@ -3,7 +3,7 @@
buildscript {
ext {
kotlin_version = '1.9.20'
agp_version = '8.7.1'
agp_version = '8.7.2'
}
repositories {