From 870f08badac57e811f6a7754bfdc39dc210b6f49 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 29 Jul 2019 17:48:43 +0800 Subject: [PATCH] up --- .../legado/app/ui/sourcedebug/SourceDebugActivity.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 4601eb202..0d0a9f014 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 @@ -88,10 +88,12 @@ class SourceDebugActivity : BaseActivity(), SourceDebug.Callba override fun printLog(state: Int, msg: String) { launch { - adapter.logList.add(msg) - adapter.notifyItemChanged(adapter.logList.size - 1) - if (state == -1 || state == 1000) { - rotate_loading.visibility = View.GONE + synchronized(this) { + adapter.logList.add(msg) + adapter.notifyItemChanged(adapter.logList.size - 1) + if (state == -1 || state == 1000) { + rotate_loading.visibility = View.GONE + } } } }