fix: home tab content not included in preferences backup

This commit is contained in:
Bnyro 2023-12-08 22:46:01 +01:00
parent 85dc55fc57
commit e5b56bee90
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)