pull/1164/head
gedoor 3 years ago
parent 055a59767a
commit 59e114aac1
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt

@ -85,8 +85,10 @@ class ReadMenu @JvmOverloads constructor(
vwBg.setOnClickListener(null) vwBg.setOnClickListener(null)
vwNavigationBar.setOnClickListener(null) vwNavigationBar.setOnClickListener(null)
llBrightness.setOnClickListener(null) llBrightness.setOnClickListener(null)
seekBrightness.post {
seekBrightness.progress = AppConfig.readBrightness seekBrightness.progress = AppConfig.readBrightness
} }
}
fun upBrightnessState() { fun upBrightnessState() {
if (brightnessAuto()) { if (brightnessAuto()) {
@ -152,8 +154,10 @@ class ReadMenu @JvmOverloads constructor(
seekBrightness.setOnSeekBarChangeListener(object : SeekBarChangeListener { seekBrightness.setOnSeekBarChangeListener(object : SeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) { override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
if (fromUser) {
setScreenBrightness(progress) setScreenBrightness(progress)
} }
}
override fun onStopTrackingTouch(seekBar: SeekBar) { override fun onStopTrackingTouch(seekBar: SeekBar) {
AppConfig.readBrightness = seekBar.progress AppConfig.readBrightness = seekBar.progress

Loading…
Cancel
Save