|
@@ -90,6 +90,7 @@ import eu.kanade.tachiyomi.util.view.setComposeContent
|
|
import kotlinx.coroutines.cancel
|
|
import kotlinx.coroutines.cancel
|
|
import kotlinx.coroutines.delay
|
|
import kotlinx.coroutines.delay
|
|
import kotlinx.coroutines.flow.drop
|
|
import kotlinx.coroutines.flow.drop
|
|
|
|
+import kotlinx.coroutines.flow.filter
|
|
import kotlinx.coroutines.flow.launchIn
|
|
import kotlinx.coroutines.flow.launchIn
|
|
import kotlinx.coroutines.flow.onEach
|
|
import kotlinx.coroutines.flow.onEach
|
|
import kotlinx.coroutines.launch
|
|
import kotlinx.coroutines.launch
|
|
@@ -243,14 +244,13 @@ class MainActivity : BaseActivity() {
|
|
LaunchedEffect(Unit) {
|
|
LaunchedEffect(Unit) {
|
|
preferences.incognitoMode().changes()
|
|
preferences.incognitoMode().changes()
|
|
.drop(1)
|
|
.drop(1)
|
|
|
|
+ .filter { !it }
|
|
.onEach {
|
|
.onEach {
|
|
- if (!it) {
|
|
|
|
- val currentScreen = navigator.lastItem
|
|
|
|
- if (currentScreen is BrowseSourceScreen ||
|
|
|
|
- (currentScreen is MangaScreen && currentScreen.fromSource)
|
|
|
|
- ) {
|
|
|
|
- navigator.popUntilRoot()
|
|
|
|
- }
|
|
|
|
|
|
+ val currentScreen = navigator.lastItem
|
|
|
|
+ if (currentScreen is BrowseSourceScreen ||
|
|
|
|
+ (currentScreen is MangaScreen && currentScreen.fromSource)
|
|
|
|
+ ) {
|
|
|
|
+ navigator.popUntilRoot()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.launchIn(this)
|
|
.launchIn(this)
|