From 47f67cc53d683bb82f2c7f6c7cedc33dc4eb77e7 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Thu, 7 Aug 2025 11:15:35 +0100 Subject: [PATCH] Revert "kotlin: json error alert to debug" This reverts commit e3443d91628c5c68a9d6b6966e8c42d2420a61c4. --- .../chat/simplex/common/model/SimpleXAPI.kt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt index f7c0bc3bb8..9e10d249c0 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt @@ -768,20 +768,15 @@ object ChatController { val rStr = if (rhId == null) chatSendCmdRetry(ctrl, c, retryNum) else chatSendRemoteCmdRetry(ctrl, rhId.toInt(), c, retryNum) // coroutine was cancelled already, no need to process response (helps with apiListMembers - very heavy query in large groups) interruptIfCancelled() - try { - val r = json.decodeFromString(rStr) - if (log) { - Log.d(TAG, "sendCmd response type ${r.responseType}") - if (r is API.Result && (r.res is CR.Response || r.res is CR.Invalid)) { - Log.d(TAG, "sendCmd response json $rStr") - } - chatModel.addTerminalItem(TerminalItem.resp(rhId, r)) + val r = json.decodeFromString(rStr) + if (log) { + Log.d(TAG, "sendCmd response type ${r.responseType}") + if (r is API.Result && (r.res is CR.Response || r.res is CR.Invalid)) { + Log.d(TAG, "sendCmd response json $rStr") } - r - } catch(e: Throwable) { - AlertManager.shared.showAlertMsg(title = "JSON error", text = "$rStr\n$e", confirmText = "Ok", shareText = true) - throw e + chatModel.addTerminalItem(TerminalItem.resp(rhId, r)) } + r } }