From e621f4e2fa80fec866f244e13d9b594d57f03453 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Tue, 12 Oct 2021 18:31:27 -0400 Subject: [PATCH] Add migration to add "all" to enabled langauges Co-authored-by: Jays2Kings --- app/build.gradle.kts | 2 +- app/src/main/java/eu/kanade/tachiyomi/Migrations.kt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c64ca34809..6e9fca30a1 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -29,7 +29,7 @@ android { minSdk = AndroidConfig.minSdk targetSdk = AndroidConfig.targetSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - versionCode = 69 + versionCode = 70 versionName = "0.12.3" buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"") diff --git a/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt b/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt index baf889d6ef..1f8928d4ac 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt @@ -7,6 +7,7 @@ import eu.kanade.tachiyomi.data.backup.BackupCreatorJob import eu.kanade.tachiyomi.data.library.LibraryUpdateJob import eu.kanade.tachiyomi.data.preference.PreferenceKeys import eu.kanade.tachiyomi.data.preference.PreferencesHelper +import eu.kanade.tachiyomi.data.preference.plusAssign import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.data.updater.UpdaterJob import eu.kanade.tachiyomi.extension.ExtensionUpdateJob @@ -229,6 +230,11 @@ object Migrations { putString(PreferenceKeys.librarySortingDirection, newSortingDirection.name) } } + if (oldVersion < 70) { + if (preferences.enabledLanguages().isSet()) { + preferences.enabledLanguages() += "all" + } + } return true }