From e7aa4e9c8adfbcf4b718f55d15ffbd17aed84d6c Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 16 Oct 2021 17:52:17 +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 --- .../read/{ReadBookBaseActivity.kt => BaseReadBookActivity.kt} | 4 ++-- .../main/java/io/legado/app/ui/book/read/ReadBookActivity.kt | 2 +- .../java/io/legado/app/ui/book/read/config/AutoReadDialog.kt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename app/src/main/java/io/legado/app/ui/book/read/{ReadBookBaseActivity.kt => BaseReadBookActivity.kt} (98%) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/BaseReadBookActivity.kt similarity index 98% rename from app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt rename to app/src/main/java/io/legado/app/ui/book/read/BaseReadBookActivity.kt index d0db5a313..eaf81ce9e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/BaseReadBookActivity.kt @@ -35,7 +35,7 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding /** * 阅读界面 */ -abstract class ReadBookBaseActivity : +abstract class BaseReadBookActivity : VMBaseActivity(imageBg = false) { override val binding by viewBinding(ActivityBookReadBinding::inflate) @@ -214,7 +214,7 @@ abstract class ReadBookBaseActivity : alertBinding.run { val start = editStart.text?.toString()?.toInt() ?: 0 val end = editEnd.text?.toString()?.toInt() ?: book.totalChapterNum - CacheBook.start(this@ReadBookBaseActivity, book.bookUrl, start - 1, end - 1) + CacheBook.start(this@BaseReadBookActivity, book.bookUrl, start - 1, end - 1) } } noButton() 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 d9cb08a9d..c566d6aab 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 @@ -59,7 +59,7 @@ import io.legado.app.utils.* import kotlinx.coroutines.* import kotlinx.coroutines.Dispatchers.IO -class ReadBookActivity : ReadBookBaseActivity(), +class ReadBookActivity : BaseReadBookActivity(), View.OnTouchListener, ReadView.CallBack, TextActionMenu.CallBack, 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 459e73155..13656f015 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 @@ -16,8 +16,8 @@ import io.legado.app.lib.theme.getPrimaryTextColor import io.legado.app.model.ReadAloud import io.legado.app.model.ReadBook import io.legado.app.service.BaseReadAloudService +import io.legado.app.ui.book.read.BaseReadBookActivity import io.legado.app.ui.book.read.ReadBookActivity -import io.legado.app.ui.book.read.ReadBookBaseActivity import io.legado.app.ui.widget.seekbar.SeekBarChangeListener import io.legado.app.utils.ColorUtils import io.legado.app.utils.viewbindingdelegate.viewBinding @@ -95,7 +95,7 @@ class AutoReadDialog : BaseDialogFragment(R.layout.dialog_auto_read) { dismissAllowingStateLoss() } binding.llSetting.setOnClickListener { - (activity as ReadBookBaseActivity).showPageAnimConfig { + (activity as BaseReadBookActivity).showPageAnimConfig { (activity as ReadBookActivity).upPageAnim() ReadBook.loadContent(false) }