fix SP crash on start
This commit is contained in:
parent
efd6b28a64
commit
0b764a2881
1 changed files with 5 additions and 1 deletions
|
@ -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