Skip to content

Commit

Permalink
[style] mash-up-kr#111 Home에서 NavController 함수 패키지 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
JaesungLeee committed Jul 10, 2023
1 parent 7e923d3 commit e8d9fa5
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.mashup.presentation.feature.guide.navigation

import androidx.navigation.NavController
import androidx.navigation.NavOptions
import com.mashup.presentation.navigation.KeyLinkNavigationRoute

/**
* Ssam_D_Android
* @author jaesung
* @created 2023/07/10
*/
fun NavController.navigateToGuideRoute(navOptions: NavOptions? = null) {
navigate(
route = KeyLinkNavigationRoute.HomeGraph.GuideRoute.route,
navOptions = navOptions
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ fun NavGraphBuilder.homeGraph(
onSubscribeKeywordClick: () -> Unit,
onGuideClick: () -> Unit,
onBackClick: () -> Unit,
nestedGraphs: NavGraphBuilder.() -> Unit,
) {
navigation(
route = KeyLinkNavigationRoute.HomeGraph.route,
startDestination = KeyLinkNavigationRoute.HomeGraph.HomeRoute.route
startDestination = KeyLinkNavigationRoute.HomeGraph.HomeRoute.route,
) {
composable(route = KeyLinkNavigationRoute.HomeGraph.HomeRoute.route) {
HomeRoute(
Expand All @@ -72,6 +73,7 @@ fun NavGraphBuilder.homeGraph(
composable(route = KeyLinkNavigationRoute.HomeGraph.ProfileRoute.route) {
// ProfileRoute
}
nestedGraphs()
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.mashup.presentation.feature.mypage.navigation

import androidx.navigation.NavController
import androidx.navigation.NavOptions
import com.mashup.presentation.navigation.KeyLinkNavigationRoute

/**
* Ssam_D_Android
* @author jaesung
* @created 2023/07/10
*/
fun NavController.navigateToProfileRoute(navOptions: NavOptions? = null) {
navigate(
route = KeyLinkNavigationRoute.HomeGraph.ProfileRoute.route,
navOptions = navOptions
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.mashup.presentation.feature.subscribe.navigation

import androidx.navigation.NavController
import androidx.navigation.NavOptions
import com.mashup.presentation.navigation.KeyLinkNavigationRoute

/**
* Ssam_D_Android
* @author jaesung
* @created 2023/07/10
*/
fun NavController.navigateToSubscribeKeywordRoute(navOptions: NavOptions? = null) {
navigate(
route = KeyLinkNavigationRoute.HomeGraph.SubscribeKeywordRoute.route,
navOptions = navOptions
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import com.mashup.presentation.KeyLinkAppState
import com.mashup.presentation.feature.chat.navigation.chatGraph
import com.mashup.presentation.feature.detail.chat.navigation.navigateToChatDetail
import com.mashup.presentation.feature.detail.message.navigation.navigateToMessageDetail
import com.mashup.presentation.feature.guide.navigation.navigateToGuideRoute
import com.mashup.presentation.feature.home.navigation.homeGraph
import com.mashup.presentation.feature.home.navigation.navigateToGuideRoute
import com.mashup.presentation.feature.home.navigation.navigateToSubscribeKeywordRoute
import com.mashup.presentation.feature.report.navigation.navigateToReport
import com.mashup.presentation.feature.signal.navigation.signalGraph
import com.mashup.presentation.feature.subscribe.navigation.navigateToSubscribeKeywordRoute

/**
* Ssam_D_Android
Expand Down

0 comments on commit e8d9fa5

Please sign in to comment.