Apply vertical seekbar hide logic to ReaderSettingsSheet
(cherry picked from commit 4e8006f329cc87438de9202cf0ac1d0d8ceb203f)
This commit is contained in:
parent
565f005692
commit
1165c57ffa
@ -4,6 +4,7 @@ import android.os.Bundle
|
||||
import android.widget.CompoundButton
|
||||
import android.widget.Spinner
|
||||
import androidx.annotation.ArrayRes
|
||||
import androidx.core.view.isGone
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.widget.NestedScrollView
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
@ -79,6 +80,17 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BaseBottomShee
|
||||
binding.autoWebtoonMode.bindToPreference(preferences.useAutoWebtoon())
|
||||
// SY <--
|
||||
|
||||
// Hides landscapeVerticalSeekbar & leftVerticalSeekbar option when forceHorizontalSeekbar is enabled
|
||||
binding.forceHorzSeekbar.bindToPreference(preferences.forceHorizontalSeekbar())
|
||||
preferences.forceHorizontalSeekbar()
|
||||
.asImmediateFlow {
|
||||
binding.landscapeVerticalSeekbar.isGone = it
|
||||
binding.leftVerticalSeekbar.isGone = it
|
||||
}
|
||||
.launchIn(activity.lifecycleScope)
|
||||
binding.landscapeVerticalSeekbar.bindToPreference(preferences.landscapeVerticalSeekbar())
|
||||
binding.leftVerticalSeekbar.bindToPreference(preferences.leftVerticalSeekbar())
|
||||
|
||||
// If the preference is explicitly disabled, that means the setting was configured since there is a cutout
|
||||
if (activity.hasCutout || !preferences.cutoutShort().get()) {
|
||||
binding.cutoutShort.isVisible = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user