From 24d6894bb91402c5246ab145807209367933f530 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 21 Aug 2021 21:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=A3=80=E6=9F=A5=E4=B9=A6?= =?UTF-8?q?=E6=BA=90=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/constant/PreferKey.kt | 1 - app/src/main/java/io/legado/app/help/AppConfig.kt | 3 --- app/src/main/java/io/legado/app/model/Debug.kt | 6 +++--- app/src/main/res/xml/pref_config_other.xml | 7 ------- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/io/legado/app/constant/PreferKey.kt b/app/src/main/java/io/legado/app/constant/PreferKey.kt index 518d053b0..14fd9c00b 100644 --- a/app/src/main/java/io/legado/app/constant/PreferKey.kt +++ b/app/src/main/java/io/legado/app/constant/PreferKey.kt @@ -100,5 +100,4 @@ object PreferKey { const val cNBBackground = "colorBottomBackgroundNight" const val bgImageN = "backgroundImageNight" const val bgImageNBlurring = "backgroundImageNightBlurring" - const val checkSourceMessage = "checkSourceMessage" } diff --git a/app/src/main/java/io/legado/app/help/AppConfig.kt b/app/src/main/java/io/legado/app/help/AppConfig.kt index 94c7249a6..fd0c75376 100644 --- a/app/src/main/java/io/legado/app/help/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/AppConfig.kt @@ -246,9 +246,6 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener { val fullScreenGesturesSupport: Boolean get() = appCtx.getPrefBoolean(PreferKey.fullScreenGesturesSupport, false) - val checkSourceMessage: Boolean - get() = appCtx.getPrefBoolean(PreferKey.checkSourceMessage) - private fun getPrefUserAgent(): String { val ua = appCtx.getPrefString(PreferKey.userAgent) if (ua.isNullOrBlank()) { diff --git a/app/src/main/java/io/legado/app/model/Debug.kt b/app/src/main/java/io/legado/app/model/Debug.kt index 300d68536..5288f975b 100644 --- a/app/src/main/java/io/legado/app/model/Debug.kt +++ b/app/src/main/java/io/legado/app/model/Debug.kt @@ -2,7 +2,6 @@ package io.legado.app.model import android.annotation.SuppressLint import io.legado.app.data.entities.* -import io.legado.app.help.AppConfig import io.legado.app.help.coroutine.CompositeCoroutine import io.legado.app.model.rss.Rss import io.legado.app.model.webBook.WebBook @@ -35,14 +34,15 @@ object Debug { showTime: Boolean = true, state: Int = 1 ) { - if (AppConfig.checkSourceMessage && isChecking) { + if (isChecking) { if (sourceUrl != null && (msg ?: "").length < 30) { var printMsg = msg ?: "" if (isHtml) { printMsg = HtmlFormatter.format(msg) } if (showTime && debugTimeMap[sourceUrl] != null) { - val time = DEBUG_TIME_FORMAT.format(Date(System.currentTimeMillis() - debugTimeMap[sourceUrl]!!)) + val time = + DEBUG_TIME_FORMAT.format(Date(System.currentTimeMillis() - debugTimeMap[sourceUrl]!!)) printMsg = "$time $printMsg" debugMessageMap[sourceUrl] = printMsg } diff --git a/app/src/main/res/xml/pref_config_other.xml b/app/src/main/res/xml/pref_config_other.xml index bb65cb3bd..28360973f 100644 --- a/app/src/main/res/xml/pref_config_other.xml +++ b/app/src/main/res/xml/pref_config_other.xml @@ -103,13 +103,6 @@ android:title="@string/threads_num_title" app:iconSpaceReserved="false" /> - -