From 7ba751fcbb8d1a69a0a3ece7f33071c77c36b496 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sat, 30 Mar 2024 23:51:13 +0100 Subject: [PATCH] Fix Migrator not doing work --- app/src/main/java/mihon/core/migration/MigrationJobFactory.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/mihon/core/migration/MigrationJobFactory.kt b/app/src/main/java/mihon/core/migration/MigrationJobFactory.kt index 846ebc2776..801411013a 100644 --- a/app/src/main/java/mihon/core/migration/MigrationJobFactory.kt +++ b/app/src/main/java/mihon/core/migration/MigrationJobFactory.kt @@ -2,6 +2,7 @@ package mihon.core.migration import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Deferred import kotlinx.coroutines.async import tachiyomi.core.common.util.system.logcat @@ -17,7 +18,7 @@ class MigrationJobFactory( .fold(CompletableDeferred(true)) { acc: Deferred, migration: Migration -> if (!migrationContext.dryrun) { logcat { "Running migration: { name = ${migration::class.simpleName}, version = ${migration.version} }" } - async { + async(start = CoroutineStart.UNDISPATCHED) { val prev = acc.await() migration(migrationContext) || prev }