mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
HomeScreen: Add static key for TabNavigator (#10191)
Fixes incorrect tab selection after process death
This commit is contained in:
parent
e22eebfd02
commit
8ff2c01bf2
1 changed files with 2 additions and 0 deletions
|
@ -66,6 +66,7 @@ object HomeScreen : Screen() {
|
|||
private val showBottomNavEvent = Channel<Boolean>()
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue