From 3b18762616e596db66a95a6568cac724c5be848e Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 2 Aug 2019 16:54:06 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/sourcedebug/SourceDebugModel.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugModel.kt b/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugModel.kt index df76cda3b..21dd988ac 100644 --- a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugModel.kt +++ b/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugModel.kt @@ -8,6 +8,7 @@ import io.legado.app.help.EventMessage import io.legado.app.model.WebBook import io.legado.app.model.webbook.SourceDebug import io.legado.app.utils.postEvent +import kotlinx.coroutines.launch class SourceDebugModel(application: Application) : BaseViewModel(application), SourceDebug.Callback { @@ -31,7 +32,9 @@ class SourceDebugModel(application: Application) : BaseViewModel(application), S } override fun printLog(state: Int, msg: String) { - postEvent(Bus.SOURCE_DEBUG_LOG, EventMessage.obtain(state, msg)) + launch { + postEvent(Bus.SOURCE_DEBUG_LOG, EventMessage.obtain(state, msg)) + } } override fun onCleared() {