HomeScreen: Add static key for TabNavigator (#10191)
Fixes incorrect tab selection after process death (cherry picked from commit 8ff2c01bf28d9d645796b7e616d3ab5c6f85a86c)
This commit is contained in:
@@ -70,6 +70,7 @@ object HomeScreen : Screen() {
|
||||
private val showBottomNavEvent = Channel<Boolean>()
|
||||
|
||||
private const val TabFadeDuration = 200
|
||||
private const val TabNavigatorKey = "HomeTabs"
|
||||
|
||||
private val tabs = listOf(
|
||||
LibraryTab,
|
||||
@@ -90,6 +91,7 @@ object HomeScreen : Screen() {
|
||||
// SY <--
|
||||
TabNavigator(
|
||||
tab = LibraryTab,
|
||||
key = TabNavigatorKey,
|
||||
) { tabNavigator ->
|
||||
// Provide usable navigator to content screen
|
||||
CompositionLocalProvider(LocalNavigator provides navigator) {
|
||||
|
||||
Reference in New Issue
Block a user