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 {