From 122a144a33baa6b52a48895410589df0e57a5a28 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 4 Mar 2022 08:53:24 +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/App.kt | 4 +- .../app/api/controller/BookController.kt | 2 +- .../java/io/legado/app/base/BaseActivity.kt | 4 +- .../java/io/legado/app/constant/AppLog.kt | 2 +- .../main/java/io/legado/app/constant/Theme.kt | 2 +- .../io/legado/app/data/entities/BaseSource.kt | 2 +- .../java/io/legado/app/data/entities/Book.kt | 4 +- .../legado/app/data/entities/BookChapter.kt | 2 +- .../io/legado/app/help/ContentProcessor.kt | 2 + .../java/io/legado/app/help/DefaultData.kt | 2 + .../java/io/legado/app/help/SourceHelp.kt | 1 + .../legado/app/help/{ => config}/AppConfig.kt | 2 +- .../app/help/{ => config}/LocalConfig.kt | 2 +- .../app/help/{ => config}/ReadBookConfig.kt | 105 +++++++++--------- .../app/help/{ => config}/ReadTipConfig.kt | 2 +- .../app/help/{ => config}/ThemeConfig.kt | 3 +- .../io/legado/app/help/http/HttpHelper.kt | 2 +- .../io/legado/app/help/http/OkHttpUtils.kt | 2 +- .../app/help/http/cronet/CronetHelper.kt | 2 +- .../app/help/http/cronet/CronetLoader.kt | 2 +- .../io/legado/app/help/storage/AppWebDav.kt | 2 +- .../java/io/legado/app/help/storage/Backup.kt | 4 +- .../io/legado/app/help/storage/Restore.kt | 4 +- .../app/lib/theme/MaterialValueHelper.kt | 2 +- .../java/io/legado/app/model/BookCover.kt | 2 +- .../java/io/legado/app/model/ReadAloud.kt | 2 +- .../main/java/io/legado/app/model/ReadBook.kt | 5 +- .../app/model/analyzeRule/AnalyzeUrl.kt | 2 +- .../legado/app/model/localBook/LocalBook.kt | 3 +- .../legado/app/model/webBook/SearchModel.kt | 2 +- .../app/receiver/MediaButtonReceiver.kt | 2 +- .../io/legado/app/service/CacheBookService.kt | 2 +- .../legado/app/service/CheckSourceService.kt | 2 +- .../app/service/HttpReadAloudService.kt | 2 +- .../legado/app/service/TTSReadAloudService.kt | 2 +- .../io/legado/app/ui/about/AboutFragment.kt | 2 +- .../legado/app/ui/about/ReadRecordActivity.kt | 2 +- .../io/legado/app/ui/about/UpdateDialog.kt | 2 +- .../association/BaseAssociationViewModel.kt | 2 +- .../ui/association/FileAssociationActivity.kt | 2 +- .../ui/association/ImportBookSourceDialog.kt | 2 +- .../association/ImportBookSourceViewModel.kt | 2 +- .../association/ImportReplaceRuleViewModel.kt | 2 +- .../ui/association/ImportRssSourceDialog.kt | 2 +- .../association/ImportRssSourceViewModel.kt | 2 +- .../ui/association/OnLineImportViewModel.kt | 4 +- .../legado/app/ui/book/cache/CacheActivity.kt | 2 +- .../app/ui/book/cache/CacheViewModel.kt | 3 +- .../book/changecover/ChangeCoverViewModel.kt | 2 +- .../changesource/ChangeBookSourceDialog.kt | 2 +- .../changesource/ChangeBookSourceViewModel.kt | 2 +- .../changesource/ChangeChapterSourceDialog.kt | 2 +- .../ChangeChapterSourceViewModel.kt | 2 +- .../app/ui/book/local/ImportBookActivity.kt | 2 +- .../app/ui/book/read/BaseReadBookActivity.kt | 6 +- .../app/ui/book/read/ReadBookActivity.kt | 4 +- .../app/ui/book/read/ReadBookViewModel.kt | 2 +- .../io/legado/app/ui/book/read/ReadMenu.kt | 6 +- .../io/legado/app/ui/book/read/SearchMenu.kt | 2 +- .../app/ui/book/read/config/AutoReadDialog.kt | 2 +- .../app/ui/book/read/config/BgAdapter.kt | 2 +- .../ui/book/read/config/BgTextConfigDialog.kt | 4 +- .../ui/book/read/config/ChineseConverter.kt | 2 +- .../read/config/ClickActionConfigDialog.kt | 2 +- .../ui/book/read/config/MoreConfigDialog.kt | 2 +- .../book/read/config/PaddingConfigDialog.kt | 2 +- .../ui/book/read/config/ReadAloudDialog.kt | 2 +- .../ui/book/read/config/ReadStyleDialog.kt | 2 +- .../ui/book/read/config/SpeakEngineDialog.kt | 2 +- .../read/config/TextFontWeightConverter.kt | 2 +- .../ui/book/read/config/TipConfigDialog.kt | 4 +- .../app/ui/book/read/page/ContentTextView.kt | 2 +- .../legado/app/ui/book/read/page/PageView.kt | 4 +- .../legado/app/ui/book/read/page/ReadView.kt | 4 +- .../page/delegate/SimulationPageDelegate.kt | 2 +- .../ui/book/read/page/entities/TextPage.kt | 2 +- .../read/page/provider/ChapterProvider.kt | 4 +- .../searchContent/SearchContentViewModel.kt | 2 +- .../source/edit/BookSourceEditActivity.kt | 2 +- .../book/source/manage/BookSourceActivity.kt | 2 +- .../app/ui/book/toc/ChapterListAdapter.kt | 2 +- .../io/legado/app/ui/book/toc/TocActivity.kt | 2 +- .../legado/app/ui/browser/WebViewActivity.kt | 2 +- .../app/ui/config/BackupConfigFragment.kt | 4 +- .../app/ui/config/OtherConfigFragment.kt | 2 +- .../app/ui/config/ThemeConfigFragment.kt | 4 +- .../legado/app/ui/config/ThemeListDialog.kt | 2 +- .../app/ui/document/adapter/FileAdapter.kt | 2 +- .../io/legado/app/ui/font/FontSelectDialog.kt | 2 +- .../io/legado/app/ui/main/MainActivity.kt | 4 +- .../io/legado/app/ui/main/MainViewModel.kt | 5 +- .../main/bookshelf/BaseBookshelfFragment.kt | 2 +- .../style1/books/BooksAdapterGrid.kt | 2 +- .../style1/books/BooksAdapterList.kt | 2 +- .../bookshelf/style1/books/BooksFragment.kt | 2 +- .../main/bookshelf/style2/BooksAdapterGrid.kt | 2 +- .../main/bookshelf/style2/BooksAdapterList.kt | 2 +- .../bookshelf/style2/BookshelfFragment2.kt | 2 +- .../app/ui/main/explore/ExploreFragment.kt | 2 +- .../io/legado/app/ui/main/my/MyFragment.kt | 4 +- .../legado/app/ui/rss/read/ReadRssActivity.kt | 2 +- .../rss/source/edit/RssSourceEditActivity.kt | 2 +- .../legado/app/ui/welcome/WelcomeActivity.kt | 2 +- .../app/ui/widget/image/CoverImageView.kt | 2 +- .../app/ui/widget/prefs/PreferenceCategory.kt | 2 +- .../legado/app/utils/AnimationUtilsSupport.kt | 2 +- .../main/java/io/legado/app/utils/LogUtils.kt | 2 +- .../io/legado/app/utils/ViewExtensions.kt | 2 +- 108 files changed, 187 insertions(+), 180 deletions(-) rename app/src/main/java/io/legado/app/help/{ => config}/AppConfig.kt (99%) rename app/src/main/java/io/legado/app/help/{ => config}/LocalConfig.kt (98%) rename app/src/main/java/io/legado/app/help/{ => config}/ReadBookConfig.kt (85%) rename app/src/main/java/io/legado/app/help/{ => config}/ReadTipConfig.kt (98%) rename app/src/main/java/io/legado/app/help/{ => config}/ThemeConfig.kt (99%) diff --git a/app/src/main/java/io/legado/app/App.kt b/app/src/main/java/io/legado/app/App.kt index 8170f6c96..fa6dfda87 100644 --- a/app/src/main/java/io/legado/app/App.kt +++ b/app/src/main/java/io/legado/app/App.kt @@ -11,10 +11,10 @@ import io.legado.app.base.AppContextWrapper import io.legado.app.constant.AppConst.channelIdDownload import io.legado.app.constant.AppConst.channelIdReadAloud import io.legado.app.constant.AppConst.channelIdWeb -import io.legado.app.help.AppConfig import io.legado.app.help.CrashHandler import io.legado.app.help.LifecycleHelp -import io.legado.app.help.ThemeConfig.applyDayNight +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ThemeConfig.applyDayNight import io.legado.app.help.http.cronet.CronetLoader import io.legado.app.utils.defaultSharedPreferences import splitties.systemservices.notificationManager diff --git a/app/src/main/java/io/legado/app/api/controller/BookController.kt b/app/src/main/java/io/legado/app/api/controller/BookController.kt index d7b4db1b5..36238e5ff 100644 --- a/app/src/main/java/io/legado/app/api/controller/BookController.kt +++ b/app/src/main/java/io/legado/app/api/controller/BookController.kt @@ -8,10 +8,10 @@ import io.legado.app.api.ReturnData import io.legado.app.constant.PreferKey import io.legado.app.data.appDb import io.legado.app.data.entities.Book -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp import io.legado.app.help.CacheManager import io.legado.app.help.ContentProcessor +import io.legado.app.help.config.AppConfig import io.legado.app.help.glide.ImageLoader import io.legado.app.help.storage.AppWebDav import io.legado.app.model.BookCover diff --git a/app/src/main/java/io/legado/app/base/BaseActivity.kt b/app/src/main/java/io/legado/app/base/BaseActivity.kt index f81f9e9f7..2b7de78d7 100644 --- a/app/src/main/java/io/legado/app/base/BaseActivity.kt +++ b/app/src/main/java/io/legado/app/base/BaseActivity.kt @@ -16,8 +16,8 @@ import io.legado.app.R import io.legado.app.constant.AppConst import io.legado.app.constant.AppLog import io.legado.app.constant.Theme -import io.legado.app.help.AppConfig -import io.legado.app.help.ThemeConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.lib.theme.ThemeStore import io.legado.app.lib.theme.backgroundColor import io.legado.app.lib.theme.primaryColor diff --git a/app/src/main/java/io/legado/app/constant/AppLog.kt b/app/src/main/java/io/legado/app/constant/AppLog.kt index 24eee2b99..75311752a 100644 --- a/app/src/main/java/io/legado/app/constant/AppLog.kt +++ b/app/src/main/java/io/legado/app/constant/AppLog.kt @@ -2,7 +2,7 @@ package io.legado.app.constant import android.util.Log import io.legado.app.BuildConfig -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig object AppLog { diff --git a/app/src/main/java/io/legado/app/constant/Theme.kt b/app/src/main/java/io/legado/app/constant/Theme.kt index f83474b69..5c7ac5bb0 100644 --- a/app/src/main/java/io/legado/app/constant/Theme.kt +++ b/app/src/main/java/io/legado/app/constant/Theme.kt @@ -1,6 +1,6 @@ package io.legado.app.constant -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.utils.ColorUtils enum class Theme { diff --git a/app/src/main/java/io/legado/app/data/entities/BaseSource.kt b/app/src/main/java/io/legado/app/data/entities/BaseSource.kt index ef0a63ab8..a872572ec 100644 --- a/app/src/main/java/io/legado/app/data/entities/BaseSource.kt +++ b/app/src/main/java/io/legado/app/data/entities/BaseSource.kt @@ -4,9 +4,9 @@ import android.util.Base64 import io.legado.app.constant.AppConst import io.legado.app.constant.AppLog import io.legado.app.data.entities.rule.RowUi -import io.legado.app.help.AppConfig import io.legado.app.help.CacheManager import io.legado.app.help.JsExtensions +import io.legado.app.help.config.AppConfig import io.legado.app.help.http.CookieStore import io.legado.app.utils.* import javax.script.SimpleBindings diff --git a/app/src/main/java/io/legado/app/data/entities/Book.kt b/app/src/main/java/io/legado/app/data/entities/Book.kt index 315a1f31e..0897d082d 100644 --- a/app/src/main/java/io/legado/app/data/entities/Book.kt +++ b/app/src/main/java/io/legado/app/data/entities/Book.kt @@ -5,8 +5,8 @@ import androidx.room.* import io.legado.app.constant.AppPattern import io.legado.app.constant.BookType import io.legado.app.data.appDb -import io.legado.app.help.AppConfig -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.model.ReadBook import io.legado.app.utils.GSON import io.legado.app.utils.MD5Utils diff --git a/app/src/main/java/io/legado/app/data/entities/BookChapter.kt b/app/src/main/java/io/legado/app/data/entities/BookChapter.kt index 7e335ccfd..4a5e3f1c6 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookChapter.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookChapter.kt @@ -8,7 +8,7 @@ import androidx.room.Index import com.github.liuyueyi.quick.transfer.ChineseUtils import io.legado.app.R import io.legado.app.constant.AppPattern -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.model.analyzeRule.AnalyzeUrl import io.legado.app.model.analyzeRule.RuleDataInterface import io.legado.app.utils.* diff --git a/app/src/main/java/io/legado/app/help/ContentProcessor.kt b/app/src/main/java/io/legado/app/help/ContentProcessor.kt index 45a41801e..429292862 100644 --- a/app/src/main/java/io/legado/app/help/ContentProcessor.kt +++ b/app/src/main/java/io/legado/app/help/ContentProcessor.kt @@ -6,6 +6,8 @@ import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.ReplaceRule +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.utils.toastOnUi import splitties.init.appCtx import java.lang.ref.WeakReference diff --git a/app/src/main/java/io/legado/app/help/DefaultData.kt b/app/src/main/java/io/legado/app/help/DefaultData.kt index d1b9e11a1..d7a989fa9 100644 --- a/app/src/main/java/io/legado/app/help/DefaultData.kt +++ b/app/src/main/java/io/legado/app/help/DefaultData.kt @@ -4,6 +4,8 @@ import io.legado.app.data.appDb import io.legado.app.data.entities.HttpTTS import io.legado.app.data.entities.RssSource import io.legado.app.data.entities.TxtTocRule +import io.legado.app.help.config.ReadBookConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.utils.GSON import io.legado.app.utils.fromJsonArray import splitties.init.appCtx diff --git a/app/src/main/java/io/legado/app/help/SourceHelp.kt b/app/src/main/java/io/legado/app/help/SourceHelp.kt index be977ec87..c4b4bfdb1 100644 --- a/app/src/main/java/io/legado/app/help/SourceHelp.kt +++ b/app/src/main/java/io/legado/app/help/SourceHelp.kt @@ -5,6 +5,7 @@ import android.os.Looper import io.legado.app.data.appDb import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.RssSource +import io.legado.app.help.config.AppConfig import io.legado.app.utils.EncoderUtils import io.legado.app.utils.NetworkUtils import io.legado.app.utils.splitNotBlank diff --git a/app/src/main/java/io/legado/app/help/AppConfig.kt b/app/src/main/java/io/legado/app/help/config/AppConfig.kt similarity index 99% rename from app/src/main/java/io/legado/app/help/AppConfig.kt rename to app/src/main/java/io/legado/app/help/config/AppConfig.kt index 0878ff572..fdaec8e38 100644 --- a/app/src/main/java/io/legado/app/help/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/config/AppConfig.kt @@ -1,4 +1,4 @@ -package io.legado.app.help +package io.legado.app.help.config import android.content.Context import android.content.SharedPreferences diff --git a/app/src/main/java/io/legado/app/help/LocalConfig.kt b/app/src/main/java/io/legado/app/help/config/LocalConfig.kt similarity index 98% rename from app/src/main/java/io/legado/app/help/LocalConfig.kt rename to app/src/main/java/io/legado/app/help/config/LocalConfig.kt index ecdbd6930..6304c8be0 100644 --- a/app/src/main/java/io/legado/app/help/LocalConfig.kt +++ b/app/src/main/java/io/legado/app/help/config/LocalConfig.kt @@ -1,4 +1,4 @@ -package io.legado.app.help +package io.legado.app.help.config import android.content.Context import androidx.core.content.edit diff --git a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt b/app/src/main/java/io/legado/app/help/config/ReadBookConfig.kt similarity index 85% rename from app/src/main/java/io/legado/app/help/ReadBookConfig.kt rename to app/src/main/java/io/legado/app/help/config/ReadBookConfig.kt index fca5e0ff2..26f043c73 100644 --- a/app/src/main/java/io/legado/app/help/ReadBookConfig.kt +++ b/app/src/main/java/io/legado/app/help/config/ReadBookConfig.kt @@ -1,4 +1,4 @@ -package io.legado.app.help +package io.legado.app.help.config import android.graphics.Color import android.graphics.drawable.BitmapDrawable @@ -8,6 +8,7 @@ import androidx.annotation.Keep import io.legado.app.R import io.legado.app.constant.AppLog import io.legado.app.constant.PreferKey +import io.legado.app.help.DefaultData import io.legado.app.help.coroutine.Coroutine import io.legado.app.model.NoStackTraceException import io.legado.app.ui.book.read.page.provider.ChapterProvider @@ -16,7 +17,6 @@ import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.withContext import splitties.init.appCtx import java.io.File -import java.io.IOException /** * 阅读界面配置 @@ -366,64 +366,65 @@ object ReadBookConfig { return exportConfig } - @Throws(IOException::class) - suspend fun import(byteArray: ByteArray): Config { - return withContext(IO) { - val configZipPath = FileUtils.getPath(appCtx.externalCache, "readConfig.zip") - FileUtils.deleteFile(configZipPath) - val zipFile = FileUtils.createFileIfNotExist(configZipPath) - zipFile.writeBytes(byteArray) - val configDirPath = FileUtils.getPath(appCtx.externalCache, "readConfig") - FileUtils.deleteFile(configDirPath) - @Suppress("BlockingMethodInNonBlockingContext") - ZipUtils.unzipFile(zipFile, FileUtils.createFolderIfNotExist(configDirPath)) - val configDir = FileUtils.createFolderIfNotExist(configDirPath) - val configFile = configDir.getFile(configFileName) - val config: Config = GSON.fromJsonObject(configFile.readText()).getOrThrow() - ?: throw NoStackTraceException("排版配置格式错误") - if (config.textFont.isNotEmpty()) { - val fontName = FileUtils.getName(config.textFont) - val fontPath = - FileUtils.getPath(appCtx.externalFiles, "font", fontName) - if (!FileUtils.exist(fontPath)) { - configDir.getFile(fontName).copyTo(File(fontPath)) + suspend fun import(byteArray: ByteArray): Result { + return kotlin.runCatching { + withContext(IO) { + val configZipPath = FileUtils.getPath(appCtx.externalCache, "readConfig.zip") + FileUtils.deleteFile(configZipPath) + val zipFile = FileUtils.createFileIfNotExist(configZipPath) + zipFile.writeBytes(byteArray) + val configDirPath = FileUtils.getPath(appCtx.externalCache, "readConfig") + FileUtils.deleteFile(configDirPath) + @Suppress("BlockingMethodInNonBlockingContext") + ZipUtils.unzipFile(zipFile, FileUtils.createFolderIfNotExist(configDirPath)) + val configDir = FileUtils.createFolderIfNotExist(configDirPath) + val configFile = configDir.getFile(configFileName) + val config: Config = GSON.fromJsonObject(configFile.readText()).getOrThrow() + ?: throw NoStackTraceException("排版配置格式错误") + if (config.textFont.isNotEmpty()) { + val fontName = FileUtils.getName(config.textFont) + val fontPath = + FileUtils.getPath(appCtx.externalFiles, "font", fontName) + if (!FileUtils.exist(fontPath)) { + configDir.getFile(fontName).copyTo(File(fontPath)) + } + config.textFont = fontPath } - config.textFont = fontPath - } - if (config.bgType == 2) { - val bgName = FileUtils.getName(config.bgStr) - val bgPath = FileUtils.getPath(appCtx.externalFiles, "bg", bgName) - if (!FileUtils.exist(bgPath)) { - val bgFile = configDir.getFile(bgName) - if (bgFile.exists()) { - bgFile.copyTo(File(bgPath)) + if (config.bgType == 2) { + val bgName = FileUtils.getName(config.bgStr) + val bgPath = FileUtils.getPath(appCtx.externalFiles, "bg", bgName) + if (!FileUtils.exist(bgPath)) { + val bgFile = configDir.getFile(bgName) + if (bgFile.exists()) { + bgFile.copyTo(File(bgPath)) + } } + config.bgStr = bgPath } - config.bgStr = bgPath - } - if (config.bgTypeNight == 2) { - val bgName = FileUtils.getName(config.bgStrNight) - val bgPath = FileUtils.getPath(appCtx.externalFiles, "bg", bgName) - if (!FileUtils.exist(bgPath)) { - val bgFile = configDir.getFile(bgName) - if (bgFile.exists()) { - bgFile.copyTo(File(bgPath)) + if (config.bgTypeNight == 2) { + val bgName = FileUtils.getName(config.bgStrNight) + val bgPath = FileUtils.getPath(appCtx.externalFiles, "bg", bgName) + if (!FileUtils.exist(bgPath)) { + val bgFile = configDir.getFile(bgName) + if (bgFile.exists()) { + bgFile.copyTo(File(bgPath)) + } } + config.bgStrNight = bgPath } - config.bgStrNight = bgPath - } - if (config.bgTypeEInk == 2) { - val bgName = FileUtils.getName(config.bgStrEInk) - val bgPath = FileUtils.getPath(appCtx.externalFiles, "bg", bgName) - if (!FileUtils.exist(bgPath)) { - val bgFile = configDir.getFile(bgName) - if (bgFile.exists()) { - bgFile.copyTo(File(bgPath)) + if (config.bgTypeEInk == 2) { + val bgName = FileUtils.getName(config.bgStrEInk) + val bgPath = FileUtils.getPath(appCtx.externalFiles, "bg", bgName) + if (!FileUtils.exist(bgPath)) { + val bgFile = configDir.getFile(bgName) + if (bgFile.exists()) { + bgFile.copyTo(File(bgPath)) + } } + config.bgStrEInk = bgPath } - config.bgStrEInk = bgPath + return@withContext config } - return@withContext config } } diff --git a/app/src/main/java/io/legado/app/help/ReadTipConfig.kt b/app/src/main/java/io/legado/app/help/config/ReadTipConfig.kt similarity index 98% rename from app/src/main/java/io/legado/app/help/ReadTipConfig.kt rename to app/src/main/java/io/legado/app/help/config/ReadTipConfig.kt index 01547c84d..114a9b275 100644 --- a/app/src/main/java/io/legado/app/help/ReadTipConfig.kt +++ b/app/src/main/java/io/legado/app/help/config/ReadTipConfig.kt @@ -1,4 +1,4 @@ -package io.legado.app.help +package io.legado.app.help.config import android.content.Context import io.legado.app.R diff --git a/app/src/main/java/io/legado/app/help/ThemeConfig.kt b/app/src/main/java/io/legado/app/help/config/ThemeConfig.kt similarity index 99% rename from app/src/main/java/io/legado/app/help/ThemeConfig.kt rename to app/src/main/java/io/legado/app/help/config/ThemeConfig.kt index 8cd0a130d..2ebef0dd6 100644 --- a/app/src/main/java/io/legado/app/help/ThemeConfig.kt +++ b/app/src/main/java/io/legado/app/help/config/ThemeConfig.kt @@ -1,4 +1,4 @@ -package io.legado.app.help +package io.legado.app.help.config import android.content.Context import android.graphics.Bitmap @@ -10,6 +10,7 @@ import io.legado.app.R import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey import io.legado.app.constant.Theme +import io.legado.app.help.DefaultData import io.legado.app.lib.theme.ThemeStore import io.legado.app.model.BookCover import io.legado.app.utils.* diff --git a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt index 7b7d91d08..83433c8c8 100644 --- a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt +++ b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt @@ -1,6 +1,6 @@ package io.legado.app.help.http -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.http.cronet.CronetInterceptor import io.legado.app.help.http.cronet.CronetLoader import okhttp3.ConnectionSpec diff --git a/app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt b/app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt index c827c5bb3..b8f1b9789 100644 --- a/app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt +++ b/app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt @@ -1,7 +1,7 @@ package io.legado.app.help.http import io.legado.app.constant.AppConst -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.utils.EncodingDetect import io.legado.app.utils.GSON import io.legado.app.utils.Utf8BomUtils diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt index 745d984ac..c3e2ae992 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt @@ -1,7 +1,7 @@ package io.legado.app.help.http.cronet import io.legado.app.constant.AppLog -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.utils.DebugLog import okhttp3.Headers import okhttp3.MediaType diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt index 010d1cd0d..bd3dd334f 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt @@ -6,7 +6,7 @@ import android.content.pm.ApplicationInfo import android.os.Build import android.text.TextUtils import io.legado.app.BuildConfig -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.utils.DebugLog import io.legado.app.utils.printOnDebug diff --git a/app/src/main/java/io/legado/app/help/storage/AppWebDav.kt b/app/src/main/java/io/legado/app/help/storage/AppWebDav.kt index 53e6ec5d9..3d3ab7b99 100644 --- a/app/src/main/java/io/legado/app/help/storage/AppWebDav.kt +++ b/app/src/main/java/io/legado/app/help/storage/AppWebDav.kt @@ -7,7 +7,7 @@ import io.legado.app.R import io.legado.app.constant.PreferKey import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookProgress -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.lib.dialogs.selector import io.legado.app.lib.webdav.HttpAuth diff --git a/app/src/main/java/io/legado/app/help/storage/Backup.kt b/app/src/main/java/io/legado/app/help/storage/Backup.kt index 64212ad33..c8b679ed1 100644 --- a/app/src/main/java/io/legado/app/help/storage/Backup.kt +++ b/app/src/main/java/io/legado/app/help/storage/Backup.kt @@ -8,8 +8,8 @@ import io.legado.app.constant.AppLog import io.legado.app.constant.PreferKey import io.legado.app.data.appDb import io.legado.app.help.DefaultData -import io.legado.app.help.ReadBookConfig -import io.legado.app.help.ThemeConfig +import io.legado.app.help.config.ReadBookConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.utils.* import kotlinx.coroutines.Dispatchers.IO diff --git a/app/src/main/java/io/legado/app/help/storage/Restore.kt b/app/src/main/java/io/legado/app/help/storage/Restore.kt index 4ef358094..dd989c042 100644 --- a/app/src/main/java/io/legado/app/help/storage/Restore.kt +++ b/app/src/main/java/io/legado/app/help/storage/Restore.kt @@ -13,8 +13,8 @@ import io.legado.app.data.appDb import io.legado.app.data.entities.* import io.legado.app.help.DefaultData import io.legado.app.help.LauncherIconHelp -import io.legado.app.help.ReadBookConfig -import io.legado.app.help.ThemeConfig +import io.legado.app.help.config.ReadBookConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.utils.* import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.Dispatchers.Main diff --git a/app/src/main/java/io/legado/app/lib/theme/MaterialValueHelper.kt b/app/src/main/java/io/legado/app/lib/theme/MaterialValueHelper.kt index 9fe726c74..116fa7a18 100644 --- a/app/src/main/java/io/legado/app/lib/theme/MaterialValueHelper.kt +++ b/app/src/main/java/io/legado/app/lib/theme/MaterialValueHelper.kt @@ -9,7 +9,7 @@ import androidx.annotation.ColorInt import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import io.legado.app.R -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.utils.ColorUtils import io.legado.app.utils.dp diff --git a/app/src/main/java/io/legado/app/model/BookCover.kt b/app/src/main/java/io/legado/app/model/BookCover.kt index 996f4f88a..0e92be364 100644 --- a/app/src/main/java/io/legado/app/model/BookCover.kt +++ b/app/src/main/java/io/legado/app/model/BookCover.kt @@ -8,8 +8,8 @@ import com.bumptech.glide.RequestBuilder import com.bumptech.glide.request.RequestOptions import io.legado.app.R import io.legado.app.constant.PreferKey -import io.legado.app.help.AppConfig import io.legado.app.help.BlurTransformation +import io.legado.app.help.config.AppConfig import io.legado.app.help.glide.ImageLoader import io.legado.app.utils.BitmapUtils import io.legado.app.utils.getPrefBoolean diff --git a/app/src/main/java/io/legado/app/model/ReadAloud.kt b/app/src/main/java/io/legado/app/model/ReadAloud.kt index 7c26182ea..513b8fc77 100644 --- a/app/src/main/java/io/legado/app/model/ReadAloud.kt +++ b/app/src/main/java/io/legado/app/model/ReadAloud.kt @@ -5,7 +5,7 @@ import android.content.Intent import io.legado.app.constant.IntentAction import io.legado.app.data.appDb import io.legado.app.data.entities.HttpTTS -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.service.BaseReadAloudService import io.legado.app.service.HttpReadAloudService import io.legado.app.service.TTSReadAloudService diff --git a/app/src/main/java/io/legado/app/model/ReadBook.kt b/app/src/main/java/io/legado/app/model/ReadBook.kt index 6c8d77784..6be083ce9 100644 --- a/app/src/main/java/io/legado/app/model/ReadBook.kt +++ b/app/src/main/java/io/legado/app/model/ReadBook.kt @@ -4,10 +4,10 @@ import io.legado.app.constant.AppLog import io.legado.app.constant.BookType import io.legado.app.data.appDb import io.legado.app.data.entities.* -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp import io.legado.app.help.ContentProcessor -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.help.storage.AppWebDav import io.legado.app.model.webBook.WebBook @@ -16,7 +16,6 @@ import io.legado.app.ui.book.read.page.entities.TextChapter import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.ui.book.read.page.provider.ImageProvider import io.legado.app.utils.msg - import io.legado.app.utils.toastOnUi import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers.IO diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt index 4fc1fff7b..8e4860364 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt @@ -12,9 +12,9 @@ import io.legado.app.constant.AppPattern.dataUriRegex import io.legado.app.data.entities.BaseSource import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter -import io.legado.app.help.AppConfig import io.legado.app.help.CacheManager import io.legado.app.help.JsExtensions +import io.legado.app.help.config.AppConfig import io.legado.app.help.http.* import io.legado.app.model.ConcurrentException import io.legado.app.utils.* diff --git a/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt b/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt index 9fe0e344d..9936c68ee 100644 --- a/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt +++ b/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt @@ -7,12 +7,11 @@ import io.legado.app.constant.AppConst import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp +import io.legado.app.help.config.AppConfig import io.legado.app.model.TocEmptyException import io.legado.app.utils.* import splitties.init.appCtx - import java.io.File import java.io.FileInputStream import java.io.FileNotFoundException diff --git a/app/src/main/java/io/legado/app/model/webBook/SearchModel.kt b/app/src/main/java/io/legado/app/model/webBook/SearchModel.kt index 97c540831..36106fbff 100644 --- a/app/src/main/java/io/legado/app/model/webBook/SearchModel.kt +++ b/app/src/main/java/io/legado/app/model/webBook/SearchModel.kt @@ -5,7 +5,7 @@ import io.legado.app.constant.PreferKey import io.legado.app.data.appDb import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.CompositeCoroutine import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.getPrefString diff --git a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt index b4ef914e3..707697f53 100644 --- a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt +++ b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt @@ -6,8 +6,8 @@ import android.content.Intent import android.view.KeyEvent import io.legado.app.constant.EventBus import io.legado.app.data.appDb -import io.legado.app.help.AppConfig import io.legado.app.help.LifecycleHelp +import io.legado.app.help.config.AppConfig import io.legado.app.model.AudioPlay import io.legado.app.model.ReadAloud import io.legado.app.model.ReadBook diff --git a/app/src/main/java/io/legado/app/service/CacheBookService.kt b/app/src/main/java/io/legado/app/service/CacheBookService.kt index 67f0f1f3c..cbba71814 100644 --- a/app/src/main/java/io/legado/app/service/CacheBookService.kt +++ b/app/src/main/java/io/legado/app/service/CacheBookService.kt @@ -7,7 +7,7 @@ import io.legado.app.base.BaseService import io.legado.app.constant.AppConst import io.legado.app.constant.EventBus import io.legado.app.constant.IntentAction -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.model.CacheBook import io.legado.app.ui.book.cache.CacheActivity import io.legado.app.utils.activityPendingIntent diff --git a/app/src/main/java/io/legado/app/service/CheckSourceService.kt b/app/src/main/java/io/legado/app/service/CheckSourceService.kt index 3f56a86d9..37f0c27d4 100644 --- a/app/src/main/java/io/legado/app/service/CheckSourceService.kt +++ b/app/src/main/java/io/legado/app/service/CheckSourceService.kt @@ -10,7 +10,7 @@ import io.legado.app.constant.IntentAction import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookSource -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.model.* import io.legado.app.model.webBook.WebBook import io.legado.app.ui.book.source.manage.BookSourceActivity diff --git a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt index 76ac2b576..4a6d76983 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -10,7 +10,7 @@ import io.legado.app.R import io.legado.app.constant.AppLog import io.legado.app.constant.AppPattern import io.legado.app.constant.EventBus -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.model.ConcurrentException import io.legado.app.model.NoStackTraceException diff --git a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt index 9a5f474de..620ac3abd 100644 --- a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt @@ -8,8 +8,8 @@ import io.legado.app.constant.AppConst import io.legado.app.constant.AppLog import io.legado.app.constant.AppPattern import io.legado.app.constant.EventBus -import io.legado.app.help.AppConfig import io.legado.app.help.MediaHelp +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.SelectItem import io.legado.app.model.NoStackTraceException import io.legado.app.model.ReadAloud diff --git a/app/src/main/java/io/legado/app/ui/about/AboutFragment.kt b/app/src/main/java/io/legado/app/ui/about/AboutFragment.kt index 3772572f7..945ec3ca0 100644 --- a/app/src/main/java/io/legado/app/ui/about/AboutFragment.kt +++ b/app/src/main/java/io/legado/app/ui/about/AboutFragment.kt @@ -10,8 +10,8 @@ import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import io.legado.app.R import io.legado.app.constant.AppConst.appInfo -import io.legado.app.help.AppConfig import io.legado.app.help.AppUpdate +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.selector import io.legado.app.ui.widget.dialog.TextDialog diff --git a/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt b/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt index 3fea0673c..a2c84b0db 100644 --- a/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt +++ b/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt @@ -13,7 +13,7 @@ import io.legado.app.data.appDb import io.legado.app.data.entities.ReadRecordShow import io.legado.app.databinding.ActivityReadRecordBinding import io.legado.app.databinding.ItemReadRecordBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.ui.book.search.SearchActivity diff --git a/app/src/main/java/io/legado/app/ui/about/UpdateDialog.kt b/app/src/main/java/io/legado/app/ui/about/UpdateDialog.kt index 56cf1776f..287157c88 100644 --- a/app/src/main/java/io/legado/app/ui/about/UpdateDialog.kt +++ b/app/src/main/java/io/legado/app/ui/about/UpdateDialog.kt @@ -6,7 +6,7 @@ import android.view.ViewGroup import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.databinding.DialogUpdateBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.primaryColor import io.legado.app.model.Download import io.legado.app.utils.setLayout diff --git a/app/src/main/java/io/legado/app/ui/association/BaseAssociationViewModel.kt b/app/src/main/java/io/legado/app/ui/association/BaseAssociationViewModel.kt index bd031907a..92b28f692 100644 --- a/app/src/main/java/io/legado/app/ui/association/BaseAssociationViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/BaseAssociationViewModel.kt @@ -6,7 +6,7 @@ import io.legado.app.base.BaseViewModel import io.legado.app.data.appDb import io.legado.app.data.entities.HttpTTS import io.legado.app.data.entities.TxtTocRule -import io.legado.app.help.ThemeConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.model.NoStackTraceException import io.legado.app.utils.GSON import io.legado.app.utils.fromJsonArray diff --git a/app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt b/app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt index 13b880ac5..bc279421f 100644 --- a/app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt +++ b/app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt @@ -8,7 +8,7 @@ import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.constant.AppLog import io.legado.app.databinding.ActivityTranslucenceBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.permission.Permissions import io.legado.app.lib.permission.PermissionsCompat diff --git a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt index b81b16c09..ccc7820e9 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt @@ -21,7 +21,7 @@ import io.legado.app.data.entities.BookSource import io.legado.app.databinding.DialogCustomGroupBinding import io.legado.app.databinding.DialogRecyclerViewBinding import io.legado.app.databinding.ItemSourceImportBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.widget.dialog.CodeDialog diff --git a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt index d5ddcf74a..00c6abf8e 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceViewModel.kt @@ -8,9 +8,9 @@ import io.legado.app.base.BaseViewModel import io.legado.app.constant.AppPattern import io.legado.app.data.appDb import io.legado.app.data.entities.BookSource -import io.legado.app.help.AppConfig import io.legado.app.help.ContentProcessor import io.legado.app.help.SourceHelp +import io.legado.app.help.config.AppConfig import io.legado.app.help.http.newCallResponseBody import io.legado.app.help.http.okHttpClient import io.legado.app.help.http.text diff --git a/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleViewModel.kt b/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleViewModel.kt index 18ce6bb00..448e79be9 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleViewModel.kt @@ -6,8 +6,8 @@ import io.legado.app.base.BaseViewModel import io.legado.app.constant.AppPattern import io.legado.app.data.appDb import io.legado.app.data.entities.ReplaceRule -import io.legado.app.help.AppConfig import io.legado.app.help.ReplaceAnalyzer +import io.legado.app.help.config.AppConfig import io.legado.app.help.http.newCallResponseBody import io.legado.app.help.http.okHttpClient import io.legado.app.help.http.text diff --git a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt index 0fbaaac5b..8334a9b10 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt @@ -21,7 +21,7 @@ import io.legado.app.data.entities.RssSource import io.legado.app.databinding.DialogCustomGroupBinding import io.legado.app.databinding.DialogRecyclerViewBinding import io.legado.app.databinding.ItemSourceImportBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.widget.dialog.CodeDialog diff --git a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.kt index ac83bc3db..e01af8671 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceViewModel.kt @@ -8,8 +8,8 @@ import io.legado.app.base.BaseViewModel import io.legado.app.constant.AppPattern import io.legado.app.data.appDb import io.legado.app.data.entities.RssSource -import io.legado.app.help.AppConfig import io.legado.app.help.SourceHelp +import io.legado.app.help.config.AppConfig import io.legado.app.help.http.newCallResponseBody import io.legado.app.help.http.okHttpClient import io.legado.app.help.http.text diff --git a/app/src/main/java/io/legado/app/ui/association/OnLineImportViewModel.kt b/app/src/main/java/io/legado/app/ui/association/OnLineImportViewModel.kt index 245179b8a..076a29f8a 100644 --- a/app/src/main/java/io/legado/app/ui/association/OnLineImportViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/OnLineImportViewModel.kt @@ -3,7 +3,7 @@ package io.legado.app.ui.association import android.app.Application import androidx.lifecycle.MutableLiveData import io.legado.app.R -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.help.http.newCallResponseBody import io.legado.app.help.http.okHttpClient import io.legado.app.help.http.text @@ -44,7 +44,7 @@ class OnLineImportViewModel(app: Application) : BaseAssociationViewModel(app) { fun importReadConfig(bytes: ByteArray, finally: (title: String, msg: String) -> Unit) { execute { - val config = ReadBookConfig.import(bytes) + val config = ReadBookConfig.import(bytes).getOrThrow() ReadBookConfig.configList.forEachIndexed { index, c -> if (c.name == config.name) { ReadBookConfig.configList[index] = config diff --git a/app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt b/app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt index 1fd092be1..32a11dfe3 100644 --- a/app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt @@ -18,8 +18,8 @@ import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookGroup import io.legado.app.databinding.ActivityCacheBookBinding import io.legado.app.databinding.DialogEditTextBinding -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.SelectItem import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.selector diff --git a/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt b/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt index acd620578..997366b57 100644 --- a/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt @@ -16,9 +16,9 @@ import io.legado.app.constant.AppPattern import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp import io.legado.app.help.ContentProcessor +import io.legado.app.help.config.AppConfig import io.legado.app.help.storage.AppWebDav import io.legado.app.model.NoStackTraceException import io.legado.app.utils.* @@ -28,7 +28,6 @@ import me.ag2s.epublib.domain.* import me.ag2s.epublib.epub.EpubWriter import me.ag2s.epublib.util.ResourceUtil import splitties.init.appCtx - import java.io.ByteArrayOutputStream import java.io.File import java.io.FileOutputStream diff --git a/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt b/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt index 39bba269b..e1b14922f 100644 --- a/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/changecover/ChangeCoverViewModel.kt @@ -10,7 +10,7 @@ import io.legado.app.constant.AppPattern import io.legado.app.data.appDb import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.CompositeCoroutine import io.legado.app.model.webBook.WebBook import kotlinx.coroutines.Dispatchers.IO diff --git a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt index 609dc21b7..996786d68 100644 --- a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt @@ -22,7 +22,7 @@ import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook import io.legado.app.databinding.DialogBookChangeSourceBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.book.source.edit.BookSourceEditActivity import io.legado.app.ui.book.source.manage.BookSourceActivity diff --git a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceViewModel.kt index c635cf16e..571e0629e 100644 --- a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceViewModel.kt @@ -12,7 +12,7 @@ import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.CompositeCoroutine import io.legado.app.model.webBook.WebBook import io.legado.app.utils.getPrefBoolean diff --git a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceDialog.kt b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceDialog.kt index 9d45cc6ce..8e433127e 100644 --- a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceDialog.kt @@ -22,8 +22,8 @@ import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook import io.legado.app.databinding.DialogChapterChangeSourceBinding -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.elevation import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.book.source.edit.BookSourceEditActivity diff --git a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceViewModel.kt index 8a9031184..d470c641d 100644 --- a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeChapterSourceViewModel.kt @@ -13,7 +13,7 @@ import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.SearchBook -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.CompositeCoroutine import io.legado.app.model.NoStackTraceException import io.legado.app.model.webBook.WebBook diff --git a/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt index b4118dc5a..c1ad5aa96 100644 --- a/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt @@ -15,7 +15,7 @@ import io.legado.app.base.VMBaseActivity import io.legado.app.data.appDb import io.legado.app.databinding.ActivityImportBookBinding import io.legado.app.databinding.DialogEditTextBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.permission.Permissions import io.legado.app.lib.permission.PermissionsCompat diff --git a/app/src/main/java/io/legado/app/ui/book/read/BaseReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/BaseReadBookActivity.kt index b49483a59..cb5d5dbae 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/BaseReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/BaseReadBookActivity.kt @@ -19,9 +19,9 @@ import io.legado.app.constant.PreferKey import io.legado.app.databinding.ActivityBookReadBinding import io.legado.app.databinding.DialogDownloadChoiceBinding import io.legado.app.databinding.DialogEditTextBinding -import io.legado.app.help.AppConfig -import io.legado.app.help.LocalConfig -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.LocalConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.ThemeStore diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 62b2ce59b..623247394 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -24,8 +24,8 @@ import io.legado.app.data.entities.BookProgress import io.legado.app.data.entities.BookSource import io.legado.app.help.BookHelp import io.legado.app.help.IntentData -import io.legado.app.help.ReadBookConfig -import io.legado.app.help.ReadTipConfig +import io.legado.app.help.config.ReadBookConfig +import io.legado.app.help.config.ReadTipConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.help.storage.AppWebDav import io.legado.app.help.storage.Backup diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt index f3b68e321..d67da2122 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt @@ -12,9 +12,9 @@ import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookProgress import io.legado.app.data.entities.BookSource -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp import io.legado.app.help.ContentProcessor +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.help.storage.AppWebDav import io.legado.app.model.NoStackTraceException diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt index a68b239e1..77489307a 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt @@ -19,7 +19,11 @@ import androidx.core.view.isVisible import io.legado.app.R import io.legado.app.constant.PreferKey import io.legado.app.databinding.ViewReadMenuBinding -import io.legado.app.help.* +import io.legado.app.help.IntentData +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.LocalConfig +import io.legado.app.help.config.ReadBookConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.* import io.legado.app.model.ReadBook diff --git a/app/src/main/java/io/legado/app/ui/book/read/SearchMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/SearchMenu.kt index 6ae9828ba..b429b18a3 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/SearchMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/SearchMenu.kt @@ -11,7 +11,7 @@ import android.widget.FrameLayout import androidx.core.view.isVisible import io.legado.app.R import io.legado.app.databinding.ViewSearchMenuBinding -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.theme.Selector import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.getPrimaryTextColor diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt index e3f631439..7cb6a42dc 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt @@ -10,7 +10,7 @@ import android.widget.SeekBar import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.databinding.DialogAutoReadBinding -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.getPrimaryTextColor import io.legado.app.model.ReadAloud diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/BgAdapter.kt b/app/src/main/java/io/legado/app/ui/book/read/config/BgAdapter.kt index 439f8d554..81cacd945 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/BgAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/BgAdapter.kt @@ -6,7 +6,7 @@ import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.constant.EventBus import io.legado.app.databinding.ItemBgImageBinding -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.help.glide.ImageLoader import io.legado.app.utils.postEvent import java.io.File diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt index c41a31bac..083250b4b 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt @@ -19,7 +19,7 @@ import io.legado.app.databinding.DialogEditTextBinding import io.legado.app.databinding.DialogReadBgTextBinding import io.legado.app.databinding.ItemBgImageBinding import io.legado.app.help.DefaultData -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.help.http.newCallResponseBody import io.legado.app.help.http.okHttpClient import io.legado.app.lib.dialogs.SelectItem @@ -338,7 +338,7 @@ class BgTextConfigDialog : BaseDialogFragment(R.layout.dialog_read_bg_text) { @Suppress("BlockingMethodInNonBlockingContext", "BlockingMethodInNonBlockingContext") private fun importConfig(byteArray: ByteArray) { execute { - ReadBookConfig.import(byteArray) + ReadBookConfig.import(byteArray).getOrThrow() }.onSuccess { ReadBookConfig.durConfig = it postEvent(EventBus.UP_CONFIG, true) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt index 549f21729..fabe3455c 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ChineseConverter.kt @@ -6,7 +6,7 @@ import android.text.SpannableString import android.text.style.ForegroundColorSpan import android.util.AttributeSet import io.legado.app.R -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.accentColor import io.legado.app.ui.widget.text.StrokeTextView diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt index 4c700d5e3..92305f545 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt @@ -9,7 +9,7 @@ import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.constant.PreferKey import io.legado.app.databinding.DialogClickActionConfigBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.selector import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.utils.getCompatColor diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt index 9e3118d1f..12cb2e23e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt @@ -12,7 +12,7 @@ import io.legado.app.R import io.legado.app.base.BasePreferenceFragment import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.primaryColor import io.legado.app.model.ReadBook diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt index 5fd0ea2b4..d55f28f32 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt @@ -9,7 +9,7 @@ import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.constant.EventBus import io.legado.app.databinding.DialogReadPaddingBinding -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.utils.postEvent import io.legado.app.utils.setLayout import io.legado.app.utils.viewbindingdelegate.viewBinding diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt index 4ed564bd6..8fdc2e84a 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt @@ -11,7 +11,7 @@ import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.constant.EventBus import io.legado.app.databinding.DialogReadAloudBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.getPrimaryTextColor import io.legado.app.model.ReadAloud diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt index a993c3840..cea371594 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt @@ -14,7 +14,7 @@ import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.constant.EventBus import io.legado.app.databinding.DialogReadBookStyleBinding import io.legado.app.databinding.ItemReadStyleBinding -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.bottomBackground diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt index f86a5a4ec..920bb08c4 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt @@ -18,8 +18,8 @@ import io.legado.app.data.entities.HttpTTS import io.legado.app.databinding.DialogEditTextBinding import io.legado.app.databinding.DialogRecyclerViewBinding import io.legado.app.databinding.ItemHttpTtsBinding -import io.legado.app.help.AppConfig import io.legado.app.help.DirectLinkUpload +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.SelectItem import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.primaryColor diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt b/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt index 67e80f1d3..dafd069f6 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/TextFontWeightConverter.kt @@ -6,7 +6,7 @@ import android.text.SpannableString import android.text.style.ForegroundColorSpan import android.util.AttributeSet import io.legado.app.R -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.accentColor import io.legado.app.ui.widget.text.StrokeTextView diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt index 788276957..59a61c284 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt @@ -8,8 +8,8 @@ import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.constant.EventBus import io.legado.app.databinding.DialogTipConfigBinding -import io.legado.app.help.ReadBookConfig -import io.legado.app.help.ReadTipConfig +import io.legado.app.help.config.ReadBookConfig +import io.legado.app.help.config.ReadTipConfig import io.legado.app.lib.dialogs.selector import io.legado.app.utils.* import io.legado.app.utils.viewbindingdelegate.viewBinding diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt index 9c33b0f67..d4c0a1940 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt @@ -9,7 +9,7 @@ import android.view.View import io.legado.app.R import io.legado.app.constant.PreferKey import io.legado.app.data.entities.Bookmark -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.theme.accentColor import io.legado.app.model.ReadBook import io.legado.app.ui.book.read.PhotoDialog diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt index dcd82dbbf..8dab898b4 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt @@ -11,8 +11,8 @@ import io.legado.app.R import io.legado.app.constant.AppConst.timeFormat import io.legado.app.data.entities.Bookmark import io.legado.app.databinding.ViewBookPageBinding -import io.legado.app.help.ReadBookConfig -import io.legado.app.help.ReadTipConfig +import io.legado.app.help.config.ReadBookConfig +import io.legado.app.help.config.ReadTipConfig import io.legado.app.model.ReadBook import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.ui.book.read.page.entities.TextPage diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt index baa394207..7d29bbfdc 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt @@ -12,8 +12,8 @@ import android.view.MotionEvent import android.view.ViewConfiguration import android.view.WindowInsets import android.widget.FrameLayout -import io.legado.app.help.AppConfig -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.theme.accentColor import io.legado.app.model.ReadAloud import io.legado.app.model.ReadBook diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt index bb3622fbc..da86b1580 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt @@ -4,7 +4,7 @@ import android.graphics.* import android.graphics.drawable.GradientDrawable import android.os.Build import android.view.MotionEvent -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.ui.book.read.page.ReadView import io.legado.app.ui.book.read.page.entities.PageDirection import kotlin.math.* diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt index a9432cb94..d82c154f8 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt @@ -3,7 +3,7 @@ package io.legado.app.ui.book.read.page.entities import android.text.Layout import android.text.StaticLayout import io.legado.app.R -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.model.ReadBook import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.utils.textHeight diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt index 54894127b..75c51c713 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt @@ -10,8 +10,8 @@ import io.legado.app.constant.AppPattern import io.legado.app.constant.EventBus import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter -import io.legado.app.help.AppConfig -import io.legado.app.help.ReadBookConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ReadBookConfig import io.legado.app.model.ReadBook import io.legado.app.ui.book.read.page.entities.TextChapter import io.legado.app.ui.book.read.page.entities.TextChar diff --git a/app/src/main/java/io/legado/app/ui/book/searchContent/SearchContentViewModel.kt b/app/src/main/java/io/legado/app/ui/book/searchContent/SearchContentViewModel.kt index acbda4f27..c46ae03a1 100644 --- a/app/src/main/java/io/legado/app/ui/book/searchContent/SearchContentViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/searchContent/SearchContentViewModel.kt @@ -7,9 +7,9 @@ import io.legado.app.base.BaseViewModel import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp import io.legado.app.help.ContentProcessor +import io.legado.app.help.config.AppConfig import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext diff --git a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt index ceb6f77c1..99a66aab0 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt @@ -20,7 +20,7 @@ import io.legado.app.constant.BookType import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.rule.* import io.legado.app.databinding.ActivityBookSourceEditBinding -import io.legado.app.help.LocalConfig +import io.legado.app.help.config.LocalConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.backgroundColor diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index 85cbba6a8..d9ced7f7f 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -21,7 +21,7 @@ import io.legado.app.data.entities.BookSource import io.legado.app.databinding.ActivityBookSourceBinding import io.legado.app.databinding.DialogEditTextBinding import io.legado.app.help.DirectLinkUpload -import io.legado.app.help.LocalConfig +import io.legado.app.help.config.LocalConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.primaryColor import io.legado.app.lib.theme.primaryTextColor diff --git a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt index bf58f8670..d8a961f33 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt @@ -9,8 +9,8 @@ import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookChapter import io.legado.app.databinding.ItemChapterListBinding -import io.legado.app.help.AppConfig import io.legado.app.help.ContentProcessor +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.lib.theme.ThemeUtils import io.legado.app.lib.theme.accentColor diff --git a/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt b/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt index b91754298..d0fb06dfa 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt @@ -15,7 +15,7 @@ import com.google.android.material.tabs.TabLayout import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.databinding.ActivityChapterListBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.primaryTextColor import io.legado.app.ui.about.AppLogDialog diff --git a/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt b/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt index fb493067f..2e4c1fade 100644 --- a/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt +++ b/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt @@ -16,7 +16,7 @@ import androidx.webkit.WebViewFeature import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.databinding.ActivityWebViewBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.SelectItem import io.legado.app.model.Download import io.legado.app.ui.association.OnLineImportActivity diff --git a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt index 42c9f51f0..8441c34d6 100644 --- a/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt @@ -17,8 +17,8 @@ import io.legado.app.R import io.legado.app.base.BasePreferenceFragment import io.legado.app.constant.AppLog import io.legado.app.constant.PreferKey -import io.legado.app.help.AppConfig -import io.legado.app.help.LocalConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.LocalConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.help.storage.* import io.legado.app.lib.dialogs.alert diff --git a/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt index 1dc958d4a..28225fd00 100644 --- a/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt @@ -13,8 +13,8 @@ import io.legado.app.base.BasePreferenceFragment import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey import io.legado.app.databinding.DialogEditTextBinding -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.primaryColor import io.legado.app.model.CheckSource diff --git a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt index 37a878567..167f692ae 100644 --- a/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt @@ -19,9 +19,9 @@ import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey import io.legado.app.databinding.DialogEditTextBinding import io.legado.app.databinding.DialogImageBlurringBinding -import io.legado.app.help.AppConfig import io.legado.app.help.LauncherIconHelp -import io.legado.app.help.ThemeConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.primaryColor diff --git a/app/src/main/java/io/legado/app/ui/config/ThemeListDialog.kt b/app/src/main/java/io/legado/app/ui/config/ThemeListDialog.kt index 5ff5c30db..e5322cdaa 100644 --- a/app/src/main/java/io/legado/app/ui/config/ThemeListDialog.kt +++ b/app/src/main/java/io/legado/app/ui/config/ThemeListDialog.kt @@ -13,7 +13,7 @@ import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.databinding.DialogRecyclerViewBinding import io.legado.app.databinding.ItemThemeConfigBinding -import io.legado.app.help.ThemeConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.widget.recycler.VerticalDivider diff --git a/app/src/main/java/io/legado/app/ui/document/adapter/FileAdapter.kt b/app/src/main/java/io/legado/app/ui/document/adapter/FileAdapter.kt index 0f44d9ed1..c17fb5bba 100644 --- a/app/src/main/java/io/legado/app/ui/document/adapter/FileAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/document/adapter/FileAdapter.kt @@ -6,7 +6,7 @@ import android.view.ViewGroup import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.databinding.ItemFileFilepickerBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.getPrimaryDisabledTextColor import io.legado.app.lib.theme.getPrimaryTextColor import io.legado.app.ui.document.entity.FileItem diff --git a/app/src/main/java/io/legado/app/ui/font/FontSelectDialog.kt b/app/src/main/java/io/legado/app/ui/font/FontSelectDialog.kt index f7e5be7d5..73b1de7e1 100644 --- a/app/src/main/java/io/legado/app/ui/font/FontSelectDialog.kt +++ b/app/src/main/java/io/legado/app/ui/font/FontSelectDialog.kt @@ -11,7 +11,7 @@ import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.constant.PreferKey import io.legado.app.databinding.DialogFontSelectBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.SelectItem import io.legado.app.lib.dialogs.alert import io.legado.app.lib.permission.Permissions diff --git a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt index cccc57294..2ad7dcb79 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt @@ -19,9 +19,9 @@ import io.legado.app.constant.AppConst.appInfo import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey import io.legado.app.databinding.ActivityMainBinding -import io.legado.app.help.AppConfig import io.legado.app.help.BookHelp -import io.legado.app.help.LocalConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.LocalConfig import io.legado.app.help.storage.Backup import io.legado.app.lib.theme.elevation import io.legado.app.lib.theme.primaryColor diff --git a/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt b/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt index c2c0c5f0d..753340946 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt @@ -10,15 +10,14 @@ import io.legado.app.constant.EventBus import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookSource -import io.legado.app.help.AppConfig import io.legado.app.help.DefaultData -import io.legado.app.help.LocalConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.LocalConfig import io.legado.app.model.CacheBook import io.legado.app.model.webBook.WebBook import io.legado.app.service.CacheBookService import io.legado.app.utils.postEvent import kotlinx.coroutines.* - import java.util.concurrent.CopyOnWriteArraySet import java.util.concurrent.Executors import kotlin.math.min diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BaseBookshelfFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BaseBookshelfFragment.kt index 8dd71e171..e4f0847f0 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BaseBookshelfFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BaseBookshelfFragment.kt @@ -15,8 +15,8 @@ import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookGroup import io.legado.app.databinding.DialogBookshelfConfigBinding import io.legado.app.databinding.DialogEditTextBinding -import io.legado.app.help.AppConfig import io.legado.app.help.DirectLinkUpload +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.ui.about.AppLogDialog import io.legado.app.ui.book.arrange.ArrangeBookActivity diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksAdapterGrid.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksAdapterGrid.kt index b029e5eed..93be8e464 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksAdapterGrid.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksAdapterGrid.kt @@ -7,7 +7,7 @@ import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.constant.BookType import io.legado.app.data.entities.Book import io.legado.app.databinding.ItemBookshelfGridBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.utils.invisible import splitties.views.onLongClick diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksAdapterList.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksAdapterList.kt index 453cefbd0..3d19dc36f 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksAdapterList.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksAdapterList.kt @@ -7,7 +7,7 @@ import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.constant.BookType import io.legado.app.data.entities.Book import io.legado.app.databinding.ItemBookshelfListBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.utils.invisible import splitties.views.onLongClick diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksFragment.kt index 150585a22..d897ed4c8 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style1/books/BooksFragment.kt @@ -14,7 +14,7 @@ import io.legado.app.constant.* import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.databinding.FragmentBooksBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.book.audio.AudioPlayActivity diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt index 8af4c7530..c82cf3d18 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt @@ -10,7 +10,7 @@ import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookGroup import io.legado.app.databinding.ItemBookshelfGridBinding import io.legado.app.databinding.ItemBookshelfGridGroupBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.utils.invisible import splitties.views.onLongClick diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt index 40acd6cdb..f7364fc68 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt @@ -10,7 +10,7 @@ import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookGroup import io.legado.app.databinding.ItemBookshelfListBinding import io.legado.app.databinding.ItemBookshelfListGroupBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.utils.gone import io.legado.app.utils.invisible import io.legado.app.utils.visible diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt index e15624ef7..6cd545f29 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BookshelfFragment2.kt @@ -14,7 +14,7 @@ import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.BookGroup import io.legado.app.databinding.FragmentBookshelf1Binding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.book.audio.AudioPlayActivity diff --git a/app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt b/app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt index 3ae28997f..270ce49fc 100644 --- a/app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/explore/ExploreFragment.kt @@ -18,7 +18,7 @@ import io.legado.app.constant.AppPattern import io.legado.app.data.appDb import io.legado.app.data.entities.BookSource import io.legado.app.databinding.FragmentExploreBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.primaryColor import io.legado.app.lib.theme.primaryTextColor import io.legado.app.ui.book.explore.ExploreShowActivity diff --git a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt index 138d862fe..4e0636931 100644 --- a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt @@ -12,8 +12,8 @@ import io.legado.app.base.BasePreferenceFragment import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey import io.legado.app.databinding.FragmentMyConfigBinding -import io.legado.app.help.AppConfig -import io.legado.app.help.ThemeConfig +import io.legado.app.help.config.AppConfig +import io.legado.app.help.config.ThemeConfig import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.primaryColor import io.legado.app.service.WebService diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt index 24274377a..71d61c80d 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt @@ -14,7 +14,7 @@ import androidx.webkit.WebViewFeature import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.databinding.ActivityRssReadBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.SelectItem import io.legado.app.lib.theme.primaryTextColor import io.legado.app.model.Download diff --git a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt index 58e6ad542..f517e6905 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt @@ -16,7 +16,7 @@ import io.legado.app.base.VMBaseActivity import io.legado.app.constant.AppConst import io.legado.app.data.entities.RssSource import io.legado.app.databinding.ActivityRssSourceEditBinding -import io.legado.app.help.LocalConfig +import io.legado.app.help.config.LocalConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.primaryColor diff --git a/app/src/main/java/io/legado/app/ui/welcome/WelcomeActivity.kt b/app/src/main/java/io/legado/app/ui/welcome/WelcomeActivity.kt index 260de8d44..f2490d775 100644 --- a/app/src/main/java/io/legado/app/ui/welcome/WelcomeActivity.kt +++ b/app/src/main/java/io/legado/app/ui/welcome/WelcomeActivity.kt @@ -7,7 +7,7 @@ import io.legado.app.base.BaseActivity import io.legado.app.constant.PreferKey import io.legado.app.data.appDb import io.legado.app.databinding.ActivityWelcomeBinding -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.coroutine.Coroutine import io.legado.app.help.storage.AppWebDav import io.legado.app.lib.theme.accentColor diff --git a/app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt b/app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt index 898e5663f..f7199c650 100644 --- a/app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/image/CoverImageView.kt @@ -10,7 +10,7 @@ import com.bumptech.glide.load.engine.GlideException import com.bumptech.glide.request.RequestListener import com.bumptech.glide.request.target.Target import io.legado.app.constant.AppPattern -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.help.glide.ImageLoader import io.legado.app.lib.theme.accentColor import io.legado.app.model.BookCover diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt b/app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt index 45cca0f19..74ff487df 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt +++ b/app/src/main/java/io/legado/app/ui/widget/prefs/PreferenceCategory.kt @@ -8,7 +8,7 @@ import androidx.core.view.isVisible import androidx.preference.PreferenceCategory import androidx.preference.PreferenceViewHolder import io.legado.app.R -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.backgroundColor import io.legado.app.utils.ColorUtils diff --git a/app/src/main/java/io/legado/app/utils/AnimationUtilsSupport.kt b/app/src/main/java/io/legado/app/utils/AnimationUtilsSupport.kt index 1400b11f2..674e162da 100644 --- a/app/src/main/java/io/legado/app/utils/AnimationUtilsSupport.kt +++ b/app/src/main/java/io/legado/app/utils/AnimationUtilsSupport.kt @@ -4,7 +4,7 @@ import android.content.Context import android.view.animation.Animation import android.view.animation.AnimationUtils import androidx.annotation.AnimRes -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig object AnimationUtilsSupport { fun loadAnimation(context: Context, @AnimRes id: Int): Animation { diff --git a/app/src/main/java/io/legado/app/utils/LogUtils.kt b/app/src/main/java/io/legado/app/utils/LogUtils.kt index e05d567c4..73b9fbd2a 100644 --- a/app/src/main/java/io/legado/app/utils/LogUtils.kt +++ b/app/src/main/java/io/legado/app/utils/LogUtils.kt @@ -4,7 +4,7 @@ package io.legado.app.utils import android.annotation.SuppressLint import io.legado.app.BuildConfig -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import splitties.init.appCtx import java.text.SimpleDateFormat import java.util.* diff --git a/app/src/main/java/io/legado/app/utils/ViewExtensions.kt b/app/src/main/java/io/legado/app/utils/ViewExtensions.kt index 4afec7b3e..a28ba8472 100644 --- a/app/src/main/java/io/legado/app/utils/ViewExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/ViewExtensions.kt @@ -18,7 +18,7 @@ import androidx.appcompat.widget.PopupMenu import androidx.core.view.get import androidx.recyclerview.widget.RecyclerView import androidx.viewpager.widget.ViewPager -import io.legado.app.help.AppConfig +import io.legado.app.help.config.AppConfig import io.legado.app.lib.theme.TintHelper import splitties.systemservices.inputMethodManager