From 548df96f8a77ceaec448bef55fdca115b6961956 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 23 Oct 2021 23:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/JsExtensions.kt | 3 +-- app/src/main/java/io/legado/app/help/storage/OldBook.kt | 5 ++--- app/src/main/java/io/legado/app/model/localBook/UmdFile.kt | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/JsExtensions.kt b/app/src/main/java/io/legado/app/help/JsExtensions.kt index b7184f11a..dc61a8f0e 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -2,7 +2,6 @@ package io.legado.app.help import android.net.Uri import android.util.Base64 -import android.util.Log import androidx.annotation.Keep import io.legado.app.BuildConfig import io.legado.app.constant.AppConst.dateFormat @@ -482,7 +481,7 @@ interface JsExtensions { Debug.log(it.getKey(), msg) } ?: Debug.log(msg) if (BuildConfig.DEBUG) { - Log.d("SourceDebugLog", msg) + Timber.d(msg) } return msg } diff --git a/app/src/main/java/io/legado/app/help/storage/OldBook.kt b/app/src/main/java/io/legado/app/help/storage/OldBook.kt index aab5c4aff..64f8e45c4 100644 --- a/app/src/main/java/io/legado/app/help/storage/OldBook.kt +++ b/app/src/main/java/io/legado/app/help/storage/OldBook.kt @@ -1,10 +1,9 @@ package io.legado.app.help.storage -import android.util.Log -import io.legado.app.constant.AppConst import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.utils.* +import timber.log.Timber object OldBook { @@ -19,7 +18,7 @@ object OldBook { if (book.bookUrl.isBlank()) continue book.name = jsonItem.readString("$.bookInfoBean.name") ?: "" if (book.bookUrl in existingBooks) { - Log.d(AppConst.APP_TAG, "Found existing book: ${book.name}") + Timber.d("Found existing book: " + book.name) continue } book.origin = jsonItem.readString("$.tag") ?: "" diff --git a/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt b/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt index 5d7e3626d..03ce0a113 100644 --- a/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt @@ -1,7 +1,6 @@ package io.legado.app.model.localBook import android.net.Uri -import android.util.Log import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.utils.FileUtils @@ -122,7 +121,7 @@ class UmdFile(var book: Book) { chapter.index = index chapter.bookUrl = book.bookUrl chapter.url = index.toString() - Log.d("UMD", chapter.url) + Timber.d(chapter.url) chapterList.add(chapter) } book.latestChapterTitle = chapterList.lastOrNull()?.title