Skip to content

Commit 6c44185

Browse files
authored
Merge branch 'develop' into feature/#108-routine-list
2 parents 2034630 + 648e824 commit 6c44185

File tree

32 files changed

+406
-2
lines changed

32 files changed

+406
-2
lines changed

app/src/main/java/com/threegap/bitnagil/MainNavHost.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import androidx.navigation.compose.composable
88
import androidx.navigation.toRoute
99
import com.threegap.bitnagil.navigation.home.HomeNavHost
1010
import com.threegap.bitnagil.presentation.emotion.EmotionScreenContainer
11+
import com.threegap.bitnagil.presentation.guide.GuideScreenContainer
1112
import com.threegap.bitnagil.presentation.login.LoginScreenContainer
1213
import com.threegap.bitnagil.presentation.onboarding.OnBoardingScreenContainer
1314
import com.threegap.bitnagil.presentation.onboarding.OnBoardingViewModel
@@ -113,6 +114,11 @@ fun MainNavHost(
113114
),
114115
)
115116
},
117+
navigateToGuide = {
118+
navigator.navController.navigate(Route.Guide) {
119+
launchSingleTop = true
120+
}
121+
},
116122
navigateToRegisterRoutine = { routineId ->
117123
navigator.navController.navigate(Route.WriteRoutine(routineId = routineId))
118124
},
@@ -259,5 +265,15 @@ fun MainNavHost(
259265
},
260266
)
261267
}
268+
269+
composable<Route.Guide> {
270+
GuideScreenContainer(
271+
navigateToBack = {
272+
if (navigator.navController.previousBackStackEntry != null) {
273+
navigator.navController.popBackStack()
274+
}
275+
},
276+
)
277+
}
262278
}
263279
}

app/src/main/java/com/threegap/bitnagil/Route.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ sealed interface Route {
4444

4545
@Serializable
4646
data class RoutineList(val selectedDate: String) : Route
47+
48+
data object Guide : Route
4749
}

app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavHost.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ fun HomeNavHost(
3939
navigateToOnBoarding: () -> Unit,
4040
navigateToNotice: () -> Unit,
4141
navigateToQnA: () -> Unit,
42+
navigateToGuide: () -> Unit,
4243
navigateToRegisterRoutine: (String?) -> Unit,
4344
navigateToEmotion: () -> Unit,
4445
navigateToRoutineList: (String) -> Unit,
@@ -63,6 +64,7 @@ fun HomeNavHost(
6364
) {
6465
composable(HomeRoute.Home.route) {
6566
HomeScreenContainer(
67+
navigateToGuide = navigateToGuide,
6668
navigateToRegisterRoutine = {
6769
navigateToRegisterRoutine(null)
6870
},
21 KB
Loading
23.7 KB
Loading
36 KB
Loading
12.7 KB
Loading
14.5 KB
Loading
20.6 KB
Loading
29.2 KB
Loading

0 commit comments

Comments
 (0)