Loading app/storage/src/main/java/com/fsck/k9/preferences/K9StoragePersister.java +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import timber.log.Timber; public class K9StoragePersister implements StoragePersister { private static final int DB_VERSION = 7; private static final int DB_VERSION = 8; private static final String DB_NAME = "preferences_storage"; private final Context context; Loading app/storage/src/main/java/com/fsck/k9/preferences/migrations/StorageMigrationTo8.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line package com.fsck.k9.preferences.migrations import android.database.sqlite.SQLiteDatabase /** * Rewrite theme setting to use `FOLLOW_SYSTEM` when it's currently set to `LIGHT`. */ class StorageMigrationTo8( private val db: SQLiteDatabase, private val migrationsHelper: StorageMigrationsHelper ) { fun rewriteTheme() { val theme = migrationsHelper.readValue(db, "theme") if (theme == THEME_LIGHT) { migrationsHelper.writeValue(db, "theme", THEME_FOLLOW_SYSTEM) } } companion object { private const val THEME_LIGHT = "LIGHT" private const val THEME_FOLLOW_SYSTEM = "FOLLOW_SYSTEM" } } app/storage/src/main/java/com/fsck/k9/preferences/migrations/StorageMigrations.kt +1 −0 Original line number Diff line number Diff line Loading @@ -13,5 +13,6 @@ internal object StorageMigrations { if (oldVersion <= 4) StorageMigrationTo5(db, migrationsHelper).fixMailCheckFrequencies() if (oldVersion <= 5) StorageMigrationTo6(db, migrationsHelper).performLegacyMigrations() if (oldVersion <= 6) StorageMigrationTo7(db, migrationsHelper).rewriteEnumOrdinalsToNames() if (oldVersion <= 7) StorageMigrationTo8(db, migrationsHelper).rewriteTheme() } } Loading
app/storage/src/main/java/com/fsck/k9/preferences/K9StoragePersister.java +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import timber.log.Timber; public class K9StoragePersister implements StoragePersister { private static final int DB_VERSION = 7; private static final int DB_VERSION = 8; private static final String DB_NAME = "preferences_storage"; private final Context context; Loading
app/storage/src/main/java/com/fsck/k9/preferences/migrations/StorageMigrationTo8.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line package com.fsck.k9.preferences.migrations import android.database.sqlite.SQLiteDatabase /** * Rewrite theme setting to use `FOLLOW_SYSTEM` when it's currently set to `LIGHT`. */ class StorageMigrationTo8( private val db: SQLiteDatabase, private val migrationsHelper: StorageMigrationsHelper ) { fun rewriteTheme() { val theme = migrationsHelper.readValue(db, "theme") if (theme == THEME_LIGHT) { migrationsHelper.writeValue(db, "theme", THEME_FOLLOW_SYSTEM) } } companion object { private const val THEME_LIGHT = "LIGHT" private const val THEME_FOLLOW_SYSTEM = "FOLLOW_SYSTEM" } }
app/storage/src/main/java/com/fsck/k9/preferences/migrations/StorageMigrations.kt +1 −0 Original line number Diff line number Diff line Loading @@ -13,5 +13,6 @@ internal object StorageMigrations { if (oldVersion <= 4) StorageMigrationTo5(db, migrationsHelper).fixMailCheckFrequencies() if (oldVersion <= 5) StorageMigrationTo6(db, migrationsHelper).performLegacyMigrations() if (oldVersion <= 6) StorageMigrationTo7(db, migrationsHelper).rewriteEnumOrdinalsToNames() if (oldVersion <= 7) StorageMigrationTo8(db, migrationsHelper).rewriteTheme() } }