Exclude some more app state preferences from backups

This commit is contained in:
arkon 2023-11-21 22:11:44 -05:00
parent d59cb9c1e3
commit bcc42dd259
4 changed files with 8 additions and 5 deletions

View File

@ -22,7 +22,7 @@ android {
defaultConfig {
applicationId = "eu.kanade.tachiyomi"
versionCode = 109
versionCode = 110
versionName = "0.14.7"
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")

View File

@ -50,7 +50,7 @@ object Migrations {
backupPreferences: BackupPreferences,
trackerManager: TrackerManager,
): Boolean {
val lastVersionCode = preferenceStore.getInt("last_version_code", 0)
val lastVersionCode = preferenceStore.getInt(Preference.appStateKey("last_version_code"), 0)
val oldVersion = lastVersionCode.get()
if (oldVersion < BuildConfig.VERSION_CODE) {
lastVersionCode.set(BuildConfig.VERSION_CODE)
@ -396,7 +396,7 @@ object Migrations {
newKey = { Preference.privateKey(it) },
)
}
if (oldVersion < 108) {
if (oldVersion < 110) {
val prefsToReplace = listOf(
"pref_download_only",
"incognito_mode",
@ -406,6 +406,9 @@ object Migrations {
"library_update_last_timestamp",
"library_unseen_updates_count",
"last_used_category",
"last_app_check",
"last_ext_check",
"last_version_code",
)
replacePreferences(
preferenceStore = preferenceStore,

View File

@ -28,7 +28,7 @@ internal class ExtensionGithubApi {
private val json: Json by injectLazy()
private val lastExtCheck: Preference<Long> by lazy {
preferenceStore.getLong("last_ext_check", 0)
preferenceStore.getLong(Preference.appStateKey("last_ext_check"), 0)
}
private var requiresFallbackSource = false

View File

@ -13,7 +13,7 @@ class GetApplicationRelease(
) {
private val lastChecked: Preference<Long> by lazy {
preferenceStore.getLong("last_app_check", 0)
preferenceStore.getLong(Preference.appStateKey("last_app_check"), 0)
}
suspend fun await(arguments: Arguments): Result {