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 Float -> putFloat(key, value)
is Long -> putLong(key, value) is Long -> putLong(key, value)
is Int -> { is Int -> {
when (key) { when {
PreferenceKeys.START_FRAGMENT -> putInt(key, value) // 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()) else -> putLong(key, value.toLong())
} }
} }