mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Merge pull request #3436 from Bnyro/master
Fix crash when restoring old backups
This commit is contained in:
commit
796d3b4990
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user