mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 23:01:51 +01:00
Hide option if tapping disabled
This commit is contained in:
parent
1681437206
commit
e6ace844b6
@ -5,6 +5,7 @@ import androidx.preference.PreferenceScreen
|
|||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues.TappingInvertMode
|
import eu.kanade.tachiyomi.data.preference.PreferenceValues.TappingInvertMode
|
||||||
|
import eu.kanade.tachiyomi.data.preference.asImmediateFlow
|
||||||
import eu.kanade.tachiyomi.util.preference.defaultValue
|
import eu.kanade.tachiyomi.util.preference.defaultValue
|
||||||
import eu.kanade.tachiyomi.util.preference.entriesRes
|
import eu.kanade.tachiyomi.util.preference.entriesRes
|
||||||
import eu.kanade.tachiyomi.util.preference.intListPreference
|
import eu.kanade.tachiyomi.util.preference.intListPreference
|
||||||
@ -14,6 +15,7 @@ import eu.kanade.tachiyomi.util.preference.summaryRes
|
|||||||
import eu.kanade.tachiyomi.util.preference.switchPreference
|
import eu.kanade.tachiyomi.util.preference.switchPreference
|
||||||
import eu.kanade.tachiyomi.util.preference.titleRes
|
import eu.kanade.tachiyomi.util.preference.titleRes
|
||||||
import eu.kanade.tachiyomi.util.system.hasDisplayCutout
|
import eu.kanade.tachiyomi.util.system.hasDisplayCutout
|
||||||
|
import kotlinx.coroutines.flow.launchIn
|
||||||
|
|
||||||
class SettingsReaderController : SettingsController() {
|
class SettingsReaderController : SettingsController() {
|
||||||
|
|
||||||
@ -209,7 +211,9 @@ class SettingsReaderController : SettingsController() {
|
|||||||
)
|
)
|
||||||
defaultValue = TappingInvertMode.NONE.name
|
defaultValue = TappingInvertMode.NONE.name
|
||||||
summary = "%s"
|
summary = "%s"
|
||||||
}.apply { dependency = Keys.readWithTapping }
|
|
||||||
|
preferences.readWithTapping().asImmediateFlow { isVisible = it }.launchIn(scope)
|
||||||
|
}
|
||||||
switchPreference {
|
switchPreference {
|
||||||
key = Keys.readWithLongTap
|
key = Keys.readWithLongTap
|
||||||
titleRes = R.string.pref_read_with_long_tap
|
titleRes = R.string.pref_read_with_long_tap
|
||||||
|
Loading…
Reference in New Issue
Block a user