Fix navigation issue when activity is recreated
This commit is contained in:
parent
cb203ef02c
commit
3c947f323f
1 changed files with 5 additions and 2 deletions
|
@ -55,7 +55,9 @@ import eu.kanade.tachiyomi.util.system.InternalResourceHelper
|
||||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
|
import kotlinx.coroutines.flow.drop
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
|
import kotlinx.coroutines.flow.onEach
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
@ -224,8 +226,9 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||||
.asImmediateFlow { binding.downloadedOnly.isVisible = it }
|
.asImmediateFlow { binding.downloadedOnly.isVisible = it }
|
||||||
.launchIn(lifecycleScope)
|
.launchIn(lifecycleScope)
|
||||||
|
|
||||||
preferences.incognitoMode()
|
preferences.incognitoMode().asFlow()
|
||||||
.asImmediateFlow {
|
.drop(1)
|
||||||
|
.onEach {
|
||||||
binding.incognitoMode.isVisible = it
|
binding.incognitoMode.isVisible = it
|
||||||
|
|
||||||
// Close BrowseSourceController and its MangaController child when incognito mode is disabled
|
// Close BrowseSourceController and its MangaController child when incognito mode is disabled
|
||||||
|
|
Reference in a new issue