web调试不输出源码

pull/946/head
gedoor 4 years ago
parent 529cd31ef1
commit e60e9e2c12
  1. 4
      app/src/main/java/io/legado/app/web/SourceDebugWebSocket.kt

@ -22,6 +22,8 @@ class SourceDebugWebSocket(handshakeRequest: NanoHTTPD.IHTTPSession) :
CoroutineScope by MainScope(), CoroutineScope by MainScope(),
Debug.Callback { Debug.Callback {
private val notPrintState = arrayOf(10, 20, 30, 40)
override fun onOpen() { override fun onOpen() {
launch(IO) { launch(IO) {
kotlin.runCatching { kotlin.runCatching {
@ -77,7 +79,7 @@ class SourceDebugWebSocket(handshakeRequest: NanoHTTPD.IHTTPSession) :
} }
override fun printLog(state: Int, msg: String) { override fun printLog(state: Int, msg: String) {
if (state in arrayOf(10, 20, 30, 40)) { if (state in notPrintState) {
return return
} }
runOnIO { runOnIO {

Loading…
Cancel
Save