Skip to content

Commit

Permalink
Merge pull request #130 from M00NJ/start-on-alarms
Browse files Browse the repository at this point in the history
Start on alarm tab (closes #128)
  • Loading branch information
M00NJ authored Aug 16, 2023
2 parents 7e199ee + e14d1b3 commit 3bd8b04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/bnyro/clock/ui/nav/NavContainer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ fun NavContainer(
val clockModel: ClockModel = viewModel()
val navController = rememberNavController()
val bottomNavItems = listOf(
NavRoutes.Clock,
NavRoutes.Alarm,
NavRoutes.Clock,
NavRoutes.Timer,
NavRoutes.Stopwatch
)
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/bnyro/clock/ui/nav/NavHost.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ fun AppNavHost(
val timerModel: TimerModel = viewModel()
val stopwatchModel: StopwatchModel = viewModel()

NavHost(navController, startDestination = NavRoutes.Clock.route) {
composable(NavRoutes.Clock.route) {
ClockScreen(clockModel)
}
NavHost(navController, startDestination = NavRoutes.Alarm.route) {
composable(NavRoutes.Alarm.route) {
AlarmScreen(alarmModel)
}
composable(NavRoutes.Clock.route) {
ClockScreen(clockModel)
}
composable(NavRoutes.Timer.route) {
TimerScreen(timerModel)
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/bnyro/clock/ui/nav/NavRoutes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ sealed class NavRoutes(
@StringRes val stringRes: Int,
val icon: ImageVector
) {
object Clock : NavRoutes("clock", R.string.clock, Icons.Default.Schedule)
object Alarm : NavRoutes("alarm", R.string.alarm, Icons.Default.Alarm)
object Clock : NavRoutes("clock", R.string.clock, Icons.Default.Schedule)
object Timer : NavRoutes("timer", R.string.timer, Icons.Default.AvTimer)
object Stopwatch : NavRoutes("stopwatch", R.string.stopwatch, Icons.Outlined.Timer)
object Settings : NavRoutes("settings", R.string.settings, Icons.Default.Settings)
Expand Down

0 comments on commit 3bd8b04

Please sign in to comment.