Fix nav overlay always showing on start (fixes #4736)

This commit is contained in:
arkon 2021-03-29 09:13:33 -04:00
parent bdbdf211e2
commit 988ec6a224
2 changed files with 16 additions and 14 deletions

View File

@ -8,6 +8,9 @@ import eu.kanade.tachiyomi.ui.reader.viewer.navigation.KindlishNavigation
import eu.kanade.tachiyomi.ui.reader.viewer.navigation.LNavigation
import eu.kanade.tachiyomi.ui.reader.viewer.navigation.RightAndLeftNavigation
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.drop
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
@ -45,13 +48,11 @@ class PagerConfig(
.register({ navigationMode = it }, { updateNavigation(navigationMode) })
preferences.pagerNavInverted()
.register(
{ tappingInverted = it },
{
navigator.invertMode = it
navigationModeChangedListener?.invoke()
}
)
.register({ tappingInverted = it }, { navigator.invertMode = it })
preferences.pagerNavInverted().asFlow()
.drop(1)
.onEach { navigationModeChangedListener?.invoke() }
.launchIn(scope)
preferences.dualPageSplitPaged()
.register(

View File

@ -8,6 +8,9 @@ import eu.kanade.tachiyomi.ui.reader.viewer.navigation.KindlishNavigation
import eu.kanade.tachiyomi.ui.reader.viewer.navigation.LNavigation
import eu.kanade.tachiyomi.ui.reader.viewer.navigation.RightAndLeftNavigation
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.drop
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
@ -36,13 +39,11 @@ class WebtoonConfig(
.register({ navigationMode = it }, { updateNavigation(it) })
preferences.webtoonNavInverted()
.register(
{ tappingInverted = it },
{
navigator.invertMode = it
navigationModeChangedListener?.invoke()
}
)
.register({ tappingInverted = it }, { navigator.invertMode = it })
preferences.webtoonNavInverted().asFlow()
.drop(1)
.onEach { navigationModeChangedListener?.invoke() }
.launchIn(scope)
preferences.dualPageSplitWebtoon()
.register({ dualPageSplit = it }, { imagePropertyChangedListener?.invoke() })