fix SP crash on start
This commit is contained in:
parent
efd6b28a64
commit
0b764a2881
|
@ -90,7 +90,11 @@ class SPImplementation @Inject constructor(
|
|||
return try {
|
||||
sharedPreferences.getLong(key, defaultValue)
|
||||
} catch (e: Exception) {
|
||||
SafeParse.stringToLong(sharedPreferences.getString(key, defaultValue.toString()))
|
||||
try {
|
||||
SafeParse.stringToLong(sharedPreferences.getString(key, defaultValue.toString()))
|
||||
} catch (e: Exception) {
|
||||
defaultValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue