Refactoring datasource di Room.

Refactoring dialog vari.
This commit is contained in:
2022-10-24 18:44:43 +02:00
parent 8216c19338
commit 92d1331630
45 changed files with 814 additions and 1125 deletions

View File

@@ -1,6 +1,13 @@
package it.integry.integrywmsnative;
import android.app.Application;
import android.os.Handler;
import android.os.Looper;
import androidx.core.os.HandlerCompat;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.inject.Singleton;
@@ -24,6 +31,7 @@ import it.integry.integrywmsnative.core.rest.consumers.GiacenzaRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.MagazzinoRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.MesRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.OrdiniRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PVOrdiniAcquistoRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PosizioniRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.PrinterRESTConsumer;
import it.integry.integrywmsnative.core.rest.consumers.ProductionLinesRESTConsumer;
@@ -50,6 +58,18 @@ public class MainApplicationModule {
return mApplication;
}
@Provides
@Singleton
public static ExecutorService providesExecutorService() {
return Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
}
@Provides
@Singleton
public static Handler providesMainThreadHandler() {
return HandlerCompat.createAsync(Looper.getMainLooper());
}
@Provides
@Singleton
AppContext providesAppContext() {
@@ -172,6 +192,12 @@ public class MainApplicationModule {
return new SystemRESTConsumer();
}
@Provides
@Singleton
PVOrdiniAcquistoRESTConsumer providesPVOrdiniAcquistoRESTConsumer(MagazzinoRESTConsumer magazzinoRESTConsumer) {
return new PVOrdiniAcquistoRESTConsumer(magazzinoRESTConsumer);
}
@Provides
@Singleton
PosizioniRESTConsumer providesPosizioniRESTConsumer(SystemRESTConsumer systemRESTConsumer) {
@@ -186,8 +212,8 @@ public class MainApplicationModule {
@Provides
@Singleton
DocInterniRESTConsumer provideDocInterniRESTConsumer() {
return new DocInterniRESTConsumer();
DocInterniRESTConsumer provideDocInterniRESTConsumer(MagazzinoRESTConsumer magazzinoRESTConsumer) {
return new DocInterniRESTConsumer(magazzinoRESTConsumer);
}
@Provides