去除检查书源调试信息配置

pull/1259/head
gedoor 3 years ago
parent afb55e45fd
commit 24d6894bb9
  1. 1
      app/src/main/java/io/legado/app/constant/PreferKey.kt
  2. 3
      app/src/main/java/io/legado/app/help/AppConfig.kt
  3. 6
      app/src/main/java/io/legado/app/model/Debug.kt
  4. 7
      app/src/main/res/xml/pref_config_other.xml

@ -100,5 +100,4 @@ object PreferKey {
const val cNBBackground = "colorBottomBackgroundNight"
const val bgImageN = "backgroundImageNight"
const val bgImageNBlurring = "backgroundImageNightBlurring"
const val checkSourceMessage = "checkSourceMessage"
}

@ -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()) {

@ -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
}

@ -103,13 +103,6 @@
android:title="@string/threads_num_title"
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false"
android:key="checkSourceMessage"
android:summary="@string/check_source_show_debug_message_summary"
android:title="@string/check_source_show_debug_message"
app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true"
android:key="process_text"

Loading…
Cancel
Save