mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
Fix crash when restoring old backups
This commit is contained in:
parent
f9a25738cd
commit
a1618a6556
@ -64,7 +64,9 @@ object PreferenceHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getInt(key: String?, defValue: Int): Int {
|
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 {
|
fun getLong(key: String?, defValue: Long): Long {
|
||||||
|
Loading…
Reference in New Issue
Block a user