Migration integrated H enable
This commit is contained in:
parent
fde71c0b70
commit
cd990df3ee
2 changed files with 17 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
||||||
|
package mihon.core.migration.migrations
|
||||||
|
|
||||||
|
import mihon.core.migration.Migration
|
||||||
|
import mihon.core.migration.MigrationContext
|
||||||
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
|
import tachiyomi.domain.UnsortedPreferences
|
||||||
|
|
||||||
|
class IntegratedHentaiMigration : Migration {
|
||||||
|
override val version: Float = 71f
|
||||||
|
|
||||||
|
override suspend fun invoke(migrationContext: MigrationContext): Boolean = withIOContext {
|
||||||
|
val unsortedPreferences = migrationContext.get<UnsortedPreferences>() ?: return@withIOContext false
|
||||||
|
unsortedPreferences.isHentaiEnabled().set(true)
|
||||||
|
return@withIOContext true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -47,5 +47,6 @@ val migrations: List<Migration>
|
||||||
TrustExtensionRepositoryMigration(),
|
TrustExtensionRepositoryMigration(),
|
||||||
// KMK -->
|
// KMK -->
|
||||||
OfficialExtensionRepositoryMigration(),
|
OfficialExtensionRepositoryMigration(),
|
||||||
|
IntegratedHentaiMigration(),
|
||||||
// KMK <--
|
// KMK <--
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue