mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-29 09:52:34 +02:00
Protects against null contact lists
This commit is contained in:
@@ -352,7 +352,11 @@ object LocalPreferences {
|
|||||||
val latestContactList = try {
|
val latestContactList = try {
|
||||||
getString(PrefKeys.LATEST_CONTACT_LIST, null)?.let {
|
getString(PrefKeys.LATEST_CONTACT_LIST, null)?.let {
|
||||||
println("Decoding Contact List: " + it)
|
println("Decoding Contact List: " + it)
|
||||||
Event.fromJson(it) as ContactListEvent?
|
if (it != null) {
|
||||||
|
Event.fromJson(it) as ContactListEvent?
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
Log.w("LocalPreferences", "Error Decoding Contact List ${getString(PrefKeys.LATEST_CONTACT_LIST, null)}", e)
|
Log.w("LocalPreferences", "Error Decoding Contact List ${getString(PrefKeys.LATEST_CONTACT_LIST, null)}", e)
|
||||||
|
Reference in New Issue
Block a user