mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:25:08 +01:00
Fixed #765
This commit is contained in:
parent
6906fff121
commit
ec87df7056
@ -42,6 +42,7 @@ import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.data.preference.asImmediateFlow
|
||||
import eu.kanade.tachiyomi.data.preference.toggle
|
||||
import eu.kanade.tachiyomi.databinding.ReaderActivityBinding
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
@ -928,7 +929,7 @@ class ReaderActivity :
|
||||
lastShiftDoubleState?.let { newViewer.config.shiftDoublePage = it }
|
||||
}
|
||||
|
||||
binding.navigationOverlay.isLTR = !(viewer is L2RPagerViewer)
|
||||
binding.navigationOverlay.isLTR = viewer !is L2RPagerViewer
|
||||
binding.viewerContainer.setBackgroundColor(
|
||||
if (viewer is WebtoonViewer) {
|
||||
Color.BLACK
|
||||
@ -1474,6 +1475,10 @@ class ReaderActivity :
|
||||
updateBottomShortcuts()
|
||||
}
|
||||
.launchIn(scope)
|
||||
|
||||
preferences.readWithTapping().asImmediateFlow(scope) {
|
||||
binding?.navigationOverlay.tappingEnabled = it
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -20,6 +20,7 @@ class ReaderNavigationOverlayView(context: Context, attributeSet: AttributeSet)
|
||||
private var navigation: ViewerNavigation? = null
|
||||
|
||||
var isLTR = true
|
||||
var tappingEnabled = true
|
||||
|
||||
fun setNavigation(navigation: ViewerNavigation, showOnStart: Boolean) {
|
||||
if (!showOnStart && (this.navigation == null || this.navigation === navigation)) {
|
||||
@ -37,7 +38,7 @@ class ReaderNavigationOverlayView(context: Context, attributeSet: AttributeSet)
|
||||
fun showNavigationAgain() {
|
||||
invalidate()
|
||||
|
||||
if (isVisible) return
|
||||
if (isVisible || !tappingEnabled) return
|
||||
|
||||
viewPropertyAnimator = animate()
|
||||
.alpha(1f)
|
||||
|
Loading…
Reference in New Issue
Block a user