diff --git a/app/src/main/java/com/github/libretube/helpers/PreferenceHelper.kt b/app/src/main/java/com/github/libretube/helpers/PreferenceHelper.kt index 621415a70..97f83a894 100644 --- a/app/src/main/java/com/github/libretube/helpers/PreferenceHelper.kt +++ b/app/src/main/java/com/github/libretube/helpers/PreferenceHelper.kt @@ -64,7 +64,9 @@ object PreferenceHelper { } fun getInt(key: String?, defValue: Int): Int { - return settings.getInt(key, defValue) + return runCatching { + settings.getInt(key, defValue) + }.getOrElse { settings.getLong(key, defValue.toLong()).toInt() } } fun getLong(key: String?, defValue: Long): Long {