From e60e9e2c12d46178faa952745fc26012f9993f14 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 8 Apr 2021 14:07:31 +0800 Subject: [PATCH] =?UTF-8?q?web=E8=B0=83=E8=AF=95=E4=B8=8D=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=BA=90=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/web/SourceDebugWebSocket.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/web/SourceDebugWebSocket.kt b/app/src/main/java/io/legado/app/web/SourceDebugWebSocket.kt index 031690a95..c2c2f893f 100644 --- a/app/src/main/java/io/legado/app/web/SourceDebugWebSocket.kt +++ b/app/src/main/java/io/legado/app/web/SourceDebugWebSocket.kt @@ -22,6 +22,8 @@ class SourceDebugWebSocket(handshakeRequest: NanoHTTPD.IHTTPSession) : CoroutineScope by MainScope(), Debug.Callback { + private val notPrintState = arrayOf(10, 20, 30, 40) + override fun onOpen() { launch(IO) { kotlin.runCatching { @@ -77,7 +79,7 @@ class SourceDebugWebSocket(handshakeRequest: NanoHTTPD.IHTTPSession) : } override fun printLog(state: Int, msg: String) { - if (state in arrayOf(10, 20, 30, 40)) { + if (state in notPrintState) { return } runOnIO {