Set coroutine dispatcher on database

pull/2967/head
Alex Baker 4 months ago
parent 6275dfbd36
commit 1acb2a3658

@ -8,6 +8,7 @@ import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import kotlinx.coroutines.Dispatchers
import org.tasks.BuildConfig
import org.tasks.R
import org.tasks.caldav.FileStorage
@ -37,6 +38,7 @@ internal class ProductionModule {
context = context,
name = databaseFile.absolutePath
)
.setQueryCoroutineContext(Dispatchers.IO)
.setDriver(BundledSQLiteDriver())
.addMigrations(*Migrations.migrations(context, fileStorage))
if (!BuildConfig.DEBUG || !preferences.getBoolean(R.string.p_crash_main_queries, false)) {

Loading…
Cancel
Save