diff --git a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt b/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt index b2c5aa269..4601eb202 100644 --- a/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt +++ b/app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt @@ -87,10 +87,12 @@ class SourceDebugActivity : BaseActivity(), SourceDebug.Callba } override fun printLog(state: Int, msg: String) { - adapter.logList.add(msg) - adapter.notifyItemChanged(adapter.logList.size - 1) - if (state == -1 || state == 1000) { - rotate_loading.visibility = View.GONE + launch { + adapter.logList.add(msg) + adapter.notifyItemChanged(adapter.logList.size - 1) + if (state == -1 || state == 1000) { + rotate_loading.visibility = View.GONE + } } }