pull/36/head
kunfei 5 years ago
parent 8b22086d54
commit 85cbe43e24
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 5
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt

@ -304,7 +304,7 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_rea
tv_chapter_url.text = it.url tv_chapter_url.text = it.url
tv_chapter_url.visible() tv_chapter_url.visible()
} }
read_menu.upReadProgress(it.pageSize().minus(1), viewModel.durPageIndex) seek_read_page.max = it.pageSize().minus(1)
tv_pre.isEnabled = viewModel.durChapterIndex != 0 tv_pre.isEnabled = viewModel.durChapterIndex != 0
tv_next.isEnabled = viewModel.durChapterIndex != viewModel.chapterSize - 1 tv_next.isEnabled = viewModel.durChapterIndex != viewModel.chapterSize - 1
curPageChanged() curPageChanged()

@ -95,11 +95,6 @@ class ReadMenu : FrameLayout {
} }
} }
fun upReadProgress(max: Int, dur: Int) {
seek_read_page.max = max
seek_read_page.progress = dur
}
private fun brightnessAuto(): Boolean { private fun brightnessAuto(): Boolean {
return context.getPrefBoolean("brightnessAuto", true) return context.getPrefBoolean("brightnessAuto", true)
} }

Loading…
Cancel
Save