mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Fix nav overlay always showing on start (fixes #4736)
This commit is contained in:
		@@ -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(
 | 
			
		||||
 
 | 
			
		||||
@@ -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() })
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user