Skip to content

Commit

Permalink
[feat] mash-up-kr#111 ReportRoute 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
JaesungLeee committed Jul 10, 2023
1 parent d427d04 commit 8184351
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand All @@ -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,
Expand Down Expand Up @@ -64,7 +58,9 @@ fun NavGraphBuilder.chatGraph(
}

composable(route = KeyLinkNavigationRoute.ChatGraph.ReportRoute.route) {
// ReportRoute
ReportRoute(
onBackClick = onBackClick
)
}
nestedGraphs() // 채팅 없을 경우 SignalGraph 연결
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -112,6 +126,6 @@ fun ReportHeader(
@Composable
private fun ReportScreenPreview() {
SsamDTheme {
ReportScreen()
ReportScreen(onBackClick = {})
}
}
Original file line number Diff line number Diff line change
@@ -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
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down

0 comments on commit 8184351

Please sign in to comment.