From 8ff2c01bf28d9d645796b7e616d3ab5c6f85a86c Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Wed, 29 Nov 2023 22:43:21 +0700 Subject: [PATCH] HomeScreen: Add static key for TabNavigator (#10191) Fixes incorrect tab selection after process death --- app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt index 236e80f83..13319c948 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/home/HomeScreen.kt @@ -66,6 +66,7 @@ object HomeScreen : Screen() { private val showBottomNavEvent = Channel() private const val TabFadeDuration = 200 + private const val TabNavigatorKey = "HomeTabs" private val tabs = listOf( LibraryTab, @@ -80,6 +81,7 @@ object HomeScreen : Screen() { val navigator = LocalNavigator.currentOrThrow TabNavigator( tab = LibraryTab, + key = TabNavigatorKey, ) { tabNavigator -> // Provide usable navigator to content screen CompositionLocalProvider(LocalNavigator provides navigator) {