Fix: Restoring SponsorBlock preferences from backup

This commit is contained in:
Bnyro 2023-07-11 12:20:25 +02:00
parent 8e09823e8d
commit 7a00b6db2d

View File

@ -90,8 +90,9 @@ object BackupHelper {
is Float -> putFloat(key, value)
is Long -> putLong(key, value)
is Int -> {
when (key) {
PreferenceKeys.START_FRAGMENT -> putInt(key, value)
when {
// we only use integers for SponsorBlock colors and the start fragment
key == PreferenceKeys.START_FRAGMENT || key.orEmpty().contains("_color") -> putInt(key, value)
else -> putLong(key, value.toLong())
}
}