mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Fix(try): Special crash on starting the app
This commit is contained in:
parent
cee71e9335
commit
d1fa085b7c
@ -25,9 +25,10 @@ object Converters {
|
||||
fun toPairStringList(byteArray: ByteArray): List<Pair<String, String>> {
|
||||
val string = String(byteArray)
|
||||
return if (string == "") emptyList()
|
||||
else string.removeSurrounding("[", "]").split(",").filter(String::isNotEmpty).map {
|
||||
else string.removeSurrounding("[", "]").split(",").filter(String::isNotEmpty).mapNotNull {
|
||||
val pairs = it.split("|")
|
||||
Pair(pairs[0], pairs[1])
|
||||
if (pairs.size == 2) Pair(pairs[0], pairs[1])
|
||||
else null
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user