Skip to content

Commit 192f734

Browse files
committed
[BOOK-45] refactor: mainBottomBarScreens set 으로 관리
1 parent 8f8f878 commit 192f734

File tree

1 file changed

+3
-1
lines changed
  • feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/component

1 file changed

+3
-1
lines changed

feature/main/src/main/kotlin/com/ninecraft/booket/feature/main/component/MainBottomBar.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,12 @@ fun Navigator.popUntilOrGoTo(screen: Screen) {
164164
}
165165
}
166166

167+
private val mainBottomBarScreens = setOf(HomeScreen, SearchScreen, LibraryScreen)
168+
167169
@Composable
168170
private fun shouldShowBottomBar(backStack: SaveableBackStack): Boolean {
169171
val currentScreen = backStack.topRecord?.screen
170-
return currentScreen is HomeScreen || currentScreen is SearchScreen || currentScreen is LibraryScreen
172+
return currentScreen in mainBottomBarScreens
171173
}
172174

173175
@Composable

0 commit comments

Comments
 (0)