From 3f13607da1b8a464a8aedfe2a4c7b7c7e3b0a460 Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 21 May 2024 12:28:11 +0200 Subject: [PATCH] fix GranularSyncModule --- .../org/dhis2/utils/granularsync/GranularSyncModule.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/dhisPlayServices/java/org/dhis2/utils/granularsync/GranularSyncModule.kt b/app/src/dhisPlayServices/java/org/dhis2/utils/granularsync/GranularSyncModule.kt index 44ec6a4b02..d40e2a78ec 100644 --- a/app/src/dhisPlayServices/java/org/dhis2/utils/granularsync/GranularSyncModule.kt +++ b/app/src/dhisPlayServices/java/org/dhis2/utils/granularsync/GranularSyncModule.kt @@ -73,6 +73,15 @@ class GranularSyncModule( ) } + @Provides + fun provideDispatchers() = object : DispatcherProvider { + override fun io() = Dispatchers.IO + + override fun computation() = Dispatchers.Default + + override fun ui() = Dispatchers.Main + } + @Provides fun granularSyncRepository( d2: D2, @@ -87,6 +96,7 @@ class GranularSyncModule( dhisProgramUtils, periodUtils, resourceManager, + provideDispatchers(), ) @Provides