From c388c49605a29943681cdc96650309bb53486c38 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Tue, 17 Dec 2024 20:57:36 +0900 Subject: [PATCH] =?UTF-8?q?[MOD/#304]=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../startfiltering/StartFilteringRoute.kt | 30 +++++++++---------- .../navigation/StartFilteringNavigation.kt | 8 ++--- .../com/terning/feature/main/MainScreen.kt | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt index 2188fe0b..b3b68134 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/StartFilteringRoute.kt @@ -41,8 +41,8 @@ import kotlinx.coroutines.delay @Composable fun StartFilteringRoute( - onButtonClick: () -> Unit, - onTextClick: () -> Unit, + onStartClick: () -> Unit, + onLaterClick: () -> Unit, viewModel: StartFilteringViewModel = hiltViewModel() ) { val state by viewModel.state.collectAsStateWithLifecycle() @@ -58,14 +58,14 @@ fun StartFilteringRoute( } StartFilteringScreen( - onButtonClick = { - onButtonClick() + onStartClick = { + onStartClick() amplitudeTracker.track( type = EventType.CLICK, name = "start_service" ) }, - onTextClick = onTextClick, + onLaterClick = onLaterClick, buttonState = state.isButtonVisible, screenHeight = screenHeight, ) @@ -73,8 +73,8 @@ fun StartFilteringRoute( @Composable fun StartFilteringScreen( - onButtonClick: () -> Unit, - onTextClick: () -> Unit, + onStartClick: () -> Unit, + onLaterClick: () -> Unit, buttonState: Boolean, screenHeight: Float, ) { @@ -103,8 +103,8 @@ fun StartFilteringScreen( Spacer(modifier = Modifier.height((79 * screenHeight).dp)) ButtonAnimation( buttonState = buttonState, - onButtonClick = onButtonClick, - onTextClick = onTextClick + onStartClick = onStartClick, + onLaterClick = onLaterClick ) Spacer(modifier = Modifier.height((24 * screenHeight).dp)) } @@ -113,8 +113,8 @@ fun StartFilteringScreen( @Composable private fun ButtonAnimation( buttonState: Boolean, - onButtonClick: () -> Unit, - onTextClick: () -> Unit, + onStartClick: () -> Unit, + onLaterClick: () -> Unit, modifier: Modifier = Modifier, ) { AnimatedVisibility( @@ -129,7 +129,7 @@ private fun ButtonAnimation( style = TerningTheme.typography.button0, paddingVertical = 17.dp, text = R.string.start_filtering_button, - onButtonClick = onButtonClick, + onButtonClick = onStartClick, cornerRadius = 10.dp, modifier = Modifier.padding(horizontal = 24.dp) ) @@ -140,7 +140,7 @@ private fun ButtonAnimation( textDecoration = TextDecoration.Underline ), color = Grey500, - modifier = Modifier.noRippleClickable { onTextClick() } + modifier = Modifier.noRippleClickable { onLaterClick() } ) } } @@ -153,8 +153,8 @@ private const val DELAY: Long = 1000 private fun StartFilteringScreenPreview() { TerningPointTheme { StartFilteringScreen( - onButtonClick = {}, - onTextClick = {}, + onStartClick = {}, + onLaterClick = {}, buttonState = true, screenHeight = 1f ) diff --git a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt index 14e025d6..f6e79b5d 100644 --- a/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt +++ b/feature/filtering/src/main/java/com/terning/feature/filtering/startfiltering/navigation/StartFilteringNavigation.kt @@ -20,14 +20,14 @@ fun NavController.navigateStartFiltering( } fun NavGraphBuilder.startFilteringNavGraph( - onButtonClick: (String) -> Unit, - onTextClick: () -> Unit + onStartClick: (String) -> Unit, + onLaterClick: () -> Unit ) { composable { val args = it.toRoute() StartFilteringRoute( - onButtonClick = { onButtonClick(args.name) }, - onTextClick = onTextClick + onStartClick = { onStartClick(args.name) }, + onLaterClick = onLaterClick ) } } diff --git a/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt index d3bc4453..e51797e7 100644 --- a/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt +++ b/feature/main/src/main/java/com/terning/feature/main/MainScreen.kt @@ -225,10 +225,10 @@ fun MainScreen( } ) startFilteringNavGraph( - onButtonClick = { name -> + onStartClick = { name -> navigator.navController.navigateFilteringOne(name) }, - onTextClick = { + onLaterClick = { val navOptions = navOptions { popUpTo(id = navigator.navController.graph.id) { inclusive = true