From 1d5c530e566f04316019b3c68585197e9f3dd37c Mon Sep 17 00:00:00 2001 From: Gideon Okuro Date: Mon, 18 Mar 2024 19:36:43 +0300 Subject: [PATCH 1/3] Update JsonUtils.kt --- .../java/org/ole/planet/myplanet/utilities/JsonUtils.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt b/app/src/main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt index 557d69a613..215c7663cb 100644 --- a/app/src/main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt +++ b/app/src/main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt @@ -13,7 +13,13 @@ object JsonUtils { return try { if (jsonObject!!.has(fieldName)) { val el: JsonElement = jsonObject.get(fieldName) - if (el is JsonNull) "" else el.asString + if (el is JsonNull) { + "" + } else if (el.isJsonPrimitive && el.asJsonPrimitive.isString) { + el.asString + } else { + "" + } } else { "" } @@ -23,6 +29,7 @@ object JsonUtils { } } + @JvmStatic fun getString(array: JsonArray, index: Int): String { return try { From 56f79fcb5cf069d5516a362e9440f5bdbf37515d Mon Sep 17 00:00:00 2001 From: dogi Date: Mon, 18 Mar 2024 13:26:23 -0400 Subject: [PATCH 2/3] Update JsonUtils.kt --- .../main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt b/app/src/main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt index 215c7663cb..2a75141dab 100644 --- a/app/src/main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt +++ b/app/src/main/java/org/ole/planet/myplanet/utilities/JsonUtils.kt @@ -29,7 +29,6 @@ object JsonUtils { } } - @JvmStatic fun getString(array: JsonArray, index: Int): String { return try { @@ -169,4 +168,4 @@ object JsonUtils { 0L } } -} \ No newline at end of file +} From 389fd54f271fd956d91877ef3fee54fb10fc4d69 Mon Sep 17 00:00:00 2001 From: dogi Date: Mon, 18 Mar 2024 13:29:13 -0400 Subject: [PATCH 3/3] Update build.gradle --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index bc856d9487..7e3fdd480e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1421 - versionName "0.14.21" + versionCode 1424 + versionName "0.14.24" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true