pull/1395/head
gedoor 3 years ago
parent 52bd1b98a6
commit e7aa4e9c8a
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/BaseReadBookActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  3. 4
      app/src/main/java/io/legado/app/ui/book/read/config/AutoReadDialog.kt

@ -35,7 +35,7 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding
/** /**
* 阅读界面 * 阅读界面
*/ */
abstract class ReadBookBaseActivity : abstract class BaseReadBookActivity :
VMBaseActivity<ActivityBookReadBinding, ReadBookViewModel>(imageBg = false) { VMBaseActivity<ActivityBookReadBinding, ReadBookViewModel>(imageBg = false) {
override val binding by viewBinding(ActivityBookReadBinding::inflate) override val binding by viewBinding(ActivityBookReadBinding::inflate)
@ -214,7 +214,7 @@ abstract class ReadBookBaseActivity :
alertBinding.run { alertBinding.run {
val start = editStart.text?.toString()?.toInt() ?: 0 val start = editStart.text?.toString()?.toInt() ?: 0
val end = editEnd.text?.toString()?.toInt() ?: book.totalChapterNum 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() noButton()

@ -59,7 +59,7 @@ import io.legado.app.utils.*
import kotlinx.coroutines.* import kotlinx.coroutines.*
import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.Dispatchers.IO
class ReadBookActivity : ReadBookBaseActivity(), class ReadBookActivity : BaseReadBookActivity(),
View.OnTouchListener, View.OnTouchListener,
ReadView.CallBack, ReadView.CallBack,
TextActionMenu.CallBack, TextActionMenu.CallBack,

@ -16,8 +16,8 @@ import io.legado.app.lib.theme.getPrimaryTextColor
import io.legado.app.model.ReadAloud import io.legado.app.model.ReadAloud
import io.legado.app.model.ReadBook import io.legado.app.model.ReadBook
import io.legado.app.service.BaseReadAloudService 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.ReadBookActivity
import io.legado.app.ui.book.read.ReadBookBaseActivity
import io.legado.app.ui.widget.seekbar.SeekBarChangeListener import io.legado.app.ui.widget.seekbar.SeekBarChangeListener
import io.legado.app.utils.ColorUtils import io.legado.app.utils.ColorUtils
import io.legado.app.utils.viewbindingdelegate.viewBinding import io.legado.app.utils.viewbindingdelegate.viewBinding
@ -95,7 +95,7 @@ class AutoReadDialog : BaseDialogFragment(R.layout.dialog_auto_read) {
dismissAllowingStateLoss() dismissAllowingStateLoss()
} }
binding.llSetting.setOnClickListener { binding.llSetting.setOnClickListener {
(activity as ReadBookBaseActivity).showPageAnimConfig { (activity as BaseReadBookActivity).showPageAnimConfig {
(activity as ReadBookActivity).upPageAnim() (activity as ReadBookActivity).upPageAnim()
ReadBook.loadContent(false) ReadBook.loadContent(false)
} }

Loading…
Cancel
Save