From 59e114aac181ce3f0eb8ef88c2bc66a3c63b546d Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 24 Jul 2021 01:09:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 9b0cee69d..21c5804e2 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 @@ -85,7 +85,9 @@ class ReadMenu @JvmOverloads constructor( vwBg.setOnClickListener(null) vwNavigationBar.setOnClickListener(null) llBrightness.setOnClickListener(null) - seekBrightness.progress = AppConfig.readBrightness + seekBrightness.post { + seekBrightness.progress = AppConfig.readBrightness + } } fun upBrightnessState() { @@ -152,7 +154,9 @@ class ReadMenu @JvmOverloads constructor( seekBrightness.setOnSeekBarChangeListener(object : SeekBarChangeListener { override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) { - setScreenBrightness(progress) + if (fromUser) { + setScreenBrightness(progress) + } } override fun onStopTrackingTouch(seekBar: SeekBar) {