mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-02-22 14:34:44 +01:00
[Extensions] Make asJsonObjectList return non-nullable JsonObjects.
This commit is contained in:
parent
4e796542d7
commit
5a77c481a2
@ -95,7 +95,7 @@ operator fun Profile.set(key: String, value: String?) = this.studentData.addProp
|
|||||||
operator fun Profile.set(key: String, value: Number) = this.studentData.addProperty(key, value)
|
operator fun Profile.set(key: String, value: Number) = this.studentData.addProperty(key, value)
|
||||||
operator fun Profile.set(key: String, value: Char) = this.studentData.addProperty(key, value)
|
operator fun Profile.set(key: String, value: Char) = this.studentData.addProperty(key, value)
|
||||||
|
|
||||||
fun JsonArray.asJsonObjectList() = this.map { it.asJsonObject }
|
fun JsonArray.asJsonObjectList() = this.mapNotNull { it.asJsonObject }
|
||||||
|
|
||||||
fun CharSequence?.isNotNullNorEmpty(): Boolean {
|
fun CharSequence?.isNotNullNorEmpty(): Boolean {
|
||||||
return this != null && this.isNotEmpty()
|
return this != null && this.isNotEmpty()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user