diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderReadingModeSettings.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderReadingModeSettings.kt index 8cf75a54c..7ce06531c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderReadingModeSettings.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderReadingModeSettings.kt @@ -72,7 +72,9 @@ class ReaderReadingModeSettings @JvmOverloads constructor(context: Context, attr binding.pagerPrefsGroup.tappingInverted.bindToPreference(preferences.pagerNavInverted()) binding.pagerPrefsGroup.pagerNav.bindToPreference(preferences.navigationModePager()) - + preferences.navigationModePager() + .asImmediateFlow { binding.pagerPrefsGroup.tappingInverted.isVisible = it != 5 } + .launchIn((context as ReaderActivity).lifecycleScope) // Makes so that landscape zoom gets hidden away when image scale type is not fit screen binding.pagerPrefsGroup.scaleType.bindToPreference(preferences.imageScaleType(), 1) preferences.imageScaleType() @@ -102,6 +104,9 @@ class ReaderReadingModeSettings @JvmOverloads constructor(context: Context, attr binding.webtoonPrefsGroup.tappingInverted.bindToPreference(preferences.webtoonNavInverted()) binding.webtoonPrefsGroup.webtoonNav.bindToPreference(preferences.navigationModeWebtoon()) + preferences.navigationModeWebtoon() + .asImmediateFlow { binding.webtoonPrefsGroup.tappingInverted.isVisible = it != 5 } + .launchIn((context as ReaderActivity).lifecycleScope) binding.webtoonPrefsGroup.cropBordersWebtoon.bindToPreference(preferences.cropBordersWebtoon()) binding.webtoonPrefsGroup.webtoonSidePadding.bindToIntPreference(preferences.webtoonSidePadding(), R.array.webtoon_side_padding_values) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index f8f9e4424..510252d5d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -15,6 +15,7 @@ import eu.kanade.tachiyomi.data.cache.ChapterCache import eu.kanade.tachiyomi.data.library.LibraryUpdateService import eu.kanade.tachiyomi.data.library.LibraryUpdateService.Target import eu.kanade.tachiyomi.data.preference.PreferenceValues +import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.network.PREF_DOH_ADGUARD import eu.kanade.tachiyomi.network.PREF_DOH_CLOUDFLARE @@ -59,6 +60,7 @@ class SettingsAdvancedController( private val network: NetworkHelper by injectLazy() private val chapterCache: ChapterCache by injectLazy() + private val trackManager: TrackManager by injectLazy() @SuppressLint("BatteryLife") override fun setupPreferenceScreen(screen: PreferenceScreen) = screen.apply { @@ -212,12 +214,14 @@ class SettingsAdvancedController( onClick { LibraryUpdateService.start(context, target = Target.COVERS) } } - preference { - key = "pref_refresh_library_tracking" - titleRes = R.string.pref_refresh_library_tracking - summaryRes = R.string.pref_refresh_library_tracking_summary + if (trackManager.hasLoggedServices()) { + preference { + key = "pref_refresh_library_tracking" + titleRes = R.string.pref_refresh_library_tracking + summaryRes = R.string.pref_refresh_library_tracking_summary - onClick { LibraryUpdateService.start(context, target = Target.TRACKING) } + onClick { LibraryUpdateService.start(context, target = Target.TRACKING) } + } } preference { key = "pref_reset_viewer_flags" diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt index e8af6c898..a67f72831 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt @@ -165,6 +165,7 @@ class SettingsReaderController : SettingsController() { TappingInvertMode.BOTH.name, ) summary = "%s" + visibleIf(preferences.navigationModePager()) { it != 5 } } intListPreference { bindTo(preferences.imageScaleType()) @@ -244,6 +245,7 @@ class SettingsReaderController : SettingsController() { TappingInvertMode.BOTH.name, ) summary = "%s" + visibleIf(preferences.navigationModeWebtoon()) { it != 5 } } intListPreference { bindTo(preferences.webtoonSidePadding())