Merge pull request #5311 from Bnyro/master

fix: home tab content not included in preferences backup
This commit is contained in:
Bnyro 2023-12-08 22:46:26 +01:00 committed by GitHub
commit be29998cbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -100,7 +100,13 @@ object BackupHelper {
}
}
is String -> putString(key, value)
is String -> {
if (key == PreferenceKeys.HOME_TAB_CONTENT) {
putStringSet(key, value.split(",").toSet())
} else {
putString(key, value)
}
}
}
}
}

View File

@ -65,6 +65,7 @@ class BackupDialog : DialogFragment() {
is Number -> JsonPrimitive(value)
is Boolean -> JsonPrimitive(value)
is String -> JsonPrimitive(value)
is Set<*> -> JsonPrimitive(value.joinToString(","))
else -> JsonNull
}
PreferenceItem(key, jsonValue)