Compare commits

...

2 Commits

Author SHA1 Message Date
MajorTanya
555d2f834f Add ProGuard rule to keep mihon namespace classes (#605)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-03-31 05:35:12 +06:00
Andreas
6b3423a12b Fix Migrator not doing work (#604) 2024-03-31 05:03:28 +06:00
2 changed files with 3 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
-keep,allowoptimization class eu.kanade.**
-keep,allowoptimization class tachiyomi.**
-keep,allowoptimization class mihon.**
# Keep common dependencies used in extensions
-keep,allowoptimization class androidx.preference.** { public protected *; }

View File

@@ -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<Boolean>, 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
}