diff --git a/presentation/src/main/java/com/mashup/presentation/feature/chat/navigation/ChatNavigation.kt b/presentation/src/main/java/com/mashup/presentation/feature/chat/navigation/ChatNavigation.kt index 23a4841c5..7c7233020 100644 --- a/presentation/src/main/java/com/mashup/presentation/feature/chat/navigation/ChatNavigation.kt +++ b/presentation/src/main/java/com/mashup/presentation/feature/chat/navigation/ChatNavigation.kt @@ -8,6 +8,7 @@ import androidx.navigation.navigation import com.mashup.presentation.feature.chat.compose.ChatRoute import com.mashup.presentation.feature.detail.chat.compose.ChatDetailRoute import com.mashup.presentation.feature.detail.message.compose.MessageDetailRoute +import com.mashup.presentation.feature.report.ReportRoute import com.mashup.presentation.navigation.KeyLinkNavigationRoute /** @@ -22,13 +23,6 @@ fun NavController.navigateToChat(navOptions: NavOptions? = null) { ) } -fun NavController.navigateToReport(navOptions: NavOptions? = null) { - navigate( - route = KeyLinkNavigationRoute.ChatGraph.ReportRoute.route, - navOptions = navOptions - ) -} - fun NavGraphBuilder.chatGraph( nestedGraphs: NavGraphBuilder.() -> Unit = {}, onBackClick: () -> Unit, @@ -64,7 +58,9 @@ fun NavGraphBuilder.chatGraph( } composable(route = KeyLinkNavigationRoute.ChatGraph.ReportRoute.route) { - // ReportRoute + ReportRoute( + onBackClick = onBackClick + ) } nestedGraphs() // 채팅 없을 경우 SignalGraph 연결 } diff --git a/presentation/src/main/java/com/mashup/presentation/feature/report/ReportScreen.kt b/presentation/src/main/java/com/mashup/presentation/feature/report/ReportScreen.kt index 943342421..bfceaf8af 100644 --- a/presentation/src/main/java/com/mashup/presentation/feature/report/ReportScreen.kt +++ b/presentation/src/main/java/com/mashup/presentation/feature/report/ReportScreen.kt @@ -25,15 +25,29 @@ import com.mashup.presentation.ui.theme.* * @author jaesung * @created 2023/07/01 */ +@Composable +fun ReportRoute( + onBackClick: () -> Unit, + modifier: Modifier = Modifier, +) { + ReportScreen( + modifier = modifier, + onBackClick = onBackClick + ) +} + @Composable fun ReportScreen( + onBackClick: () -> Unit, modifier: Modifier = Modifier ) { Scaffold( modifier = modifier, backgroundColor = Black, topBar = { - KeyLinkToolbar() + KeyLinkToolbar( + onClickBack = onBackClick + ) } ) { paddingValues -> Column( @@ -112,6 +126,6 @@ fun ReportHeader( @Composable private fun ReportScreenPreview() { SsamDTheme { - ReportScreen() + ReportScreen(onBackClick = {}) } } diff --git a/presentation/src/main/java/com/mashup/presentation/feature/report/navigation/ReportNavigation.kt b/presentation/src/main/java/com/mashup/presentation/feature/report/navigation/ReportNavigation.kt new file mode 100644 index 000000000..555515fd4 --- /dev/null +++ b/presentation/src/main/java/com/mashup/presentation/feature/report/navigation/ReportNavigation.kt @@ -0,0 +1,17 @@ +package com.mashup.presentation.feature.report.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.navigateToReport(navOptions: NavOptions? = null) { + navigate( + route = KeyLinkNavigationRoute.ChatGraph.ReportRoute.route, + navOptions = navOptions + ) +} \ No newline at end of file diff --git a/presentation/src/main/java/com/mashup/presentation/navigation/KeyLinkNavHost.kt b/presentation/src/main/java/com/mashup/presentation/navigation/KeyLinkNavHost.kt index ccbe6ebd8..486d8c809 100644 --- a/presentation/src/main/java/com/mashup/presentation/navigation/KeyLinkNavHost.kt +++ b/presentation/src/main/java/com/mashup/presentation/navigation/KeyLinkNavHost.kt @@ -5,12 +5,12 @@ import androidx.compose.ui.Modifier import androidx.navigation.compose.NavHost import com.mashup.presentation.KeyLinkAppState import com.mashup.presentation.feature.chat.navigation.chatGraph -import com.mashup.presentation.feature.chat.navigation.navigateToReport import com.mashup.presentation.feature.detail.chat.navigation.navigateToChatDetail import com.mashup.presentation.feature.detail.message.navigation.navigateToMessageDetail 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 /**