From 171d09405f54ec3e8c173f9ce089a3760ffb34df Mon Sep 17 00:00:00 2001 From: wjchoi96 Date: Sun, 5 Jan 2025 15:23:03 +0900 Subject: [PATCH] chore:TOP-106 lint check --- .../remote/response/topic/DailyTopicResponse.kt | 2 ++ feature/tohot/build.gradle.kts | 1 - .../tohot/component/card/OneTypeTopicSelectCard.kt | 2 +- .../component/card/TopicSelectTypeCardScreen.kt | 4 ++-- .../tohot/component/card/TwoTypeTopicSelectCard.kt | 12 ++++++------ .../feature/tohot/component/topic/FourTypeTopic.kt | 3 +-- .../tht/feature/tohot/mapper/TopicUiModelMapper.kt | 2 +- .../tohot/tohot/viewmodel/ToHotViewModel.kt | 14 +++++++------- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/data/src/main/java/com/tht/tht/data/remote/response/topic/DailyTopicResponse.kt b/data/src/main/java/com/tht/tht/data/remote/response/topic/DailyTopicResponse.kt index dad0472c..55376b37 100644 --- a/data/src/main/java/com/tht/tht/data/remote/response/topic/DailyTopicResponse.kt +++ b/data/src/main/java/com/tht/tht/data/remote/response/topic/DailyTopicResponse.kt @@ -28,8 +28,10 @@ data class DailyTopicResponse( enum class TopicSelectType { @SerializedName("oneChoice") ONE_CHOICE, + @SerializedName("twoChoice") TWO_CHOICE, + @SerializedName("fourChoice") FOUR_CHOICE } diff --git a/feature/tohot/build.gradle.kts b/feature/tohot/build.gradle.kts index d2be79ce..f869d9c6 100644 --- a/feature/tohot/build.gradle.kts +++ b/feature/tohot/build.gradle.kts @@ -72,7 +72,6 @@ dependencies { implementation(libs.jetpack.compose.coil) implementation(libs.jetpack.coil.svg) implementation(libs.jetpack.compose.foundation) - implementation(libs.app.compat.theme.adpater) implementation(libs.lottie.compose) diff --git a/feature/tohot/src/main/java/tht/feature/tohot/component/card/OneTypeTopicSelectCard.kt b/feature/tohot/src/main/java/tht/feature/tohot/component/card/OneTypeTopicSelectCard.kt index 3fec00b2..fb48ecb0 100644 --- a/feature/tohot/src/main/java/tht/feature/tohot/component/card/OneTypeTopicSelectCard.kt +++ b/feature/tohot/src/main/java/tht/feature/tohot/component/card/OneTypeTopicSelectCard.kt @@ -62,7 +62,7 @@ private fun OneTypeTopic( topicUiModel: TopicUiModel, isSelect: Boolean, modifier: Modifier = Modifier, - onSelectTopic: (Int) -> Unit = { }, + onSelectTopic: (Int) -> Unit = { } ) { Column( modifier = modifier diff --git a/feature/tohot/src/main/java/tht/feature/tohot/component/card/TopicSelectTypeCardScreen.kt b/feature/tohot/src/main/java/tht/feature/tohot/component/card/TopicSelectTypeCardScreen.kt index 19d779d6..534debe7 100644 --- a/feature/tohot/src/main/java/tht/feature/tohot/component/card/TopicSelectTypeCardScreen.kt +++ b/feature/tohot/src/main/java/tht/feature/tohot/component/card/TopicSelectTypeCardScreen.kt @@ -69,12 +69,12 @@ fun TopicSelectTypeCardScreen( colors = listOf( colorResource(R.color.gray_8d8d8d).copy(alpha = 0.3f), colorResource(R.color.black_414141).copy(alpha = 0.9f) - ), + ) ), shape = RoundedCornerShape(12.dp) ) .clipToBounds() - .padding(horizontal = 16.dp, vertical = 17.dp), + .padding(horizontal = 16.dp, vertical = 17.dp) ) { Spacer(modifier = Modifier.height(15.dp)) ThtP1( diff --git a/feature/tohot/src/main/java/tht/feature/tohot/component/card/TwoTypeTopicSelectCard.kt b/feature/tohot/src/main/java/tht/feature/tohot/component/card/TwoTypeTopicSelectCard.kt index 541f445b..8533b117 100644 --- a/feature/tohot/src/main/java/tht/feature/tohot/component/card/TwoTypeTopicSelectCard.kt +++ b/feature/tohot/src/main/java/tht/feature/tohot/component/card/TwoTypeTopicSelectCard.kt @@ -46,10 +46,10 @@ fun TwoTypeTopicSelectCard( onClickConfirm: () -> Unit = { } ) { val hasSelectTopic by remember(selectTopicIdx, topicSelectUiModel) { - mutableStateOf( - topicSelectUiModel.topic1.idx == selectTopicIdx || - topicSelectUiModel.topic2.idx == selectTopicIdx - ) + mutableStateOf( + topicSelectUiModel.topic1.idx == selectTopicIdx || + topicSelectUiModel.topic2.idx == selectTopicIdx + ) } TopicSelectTypeCardScreen( modifier = modifier, @@ -162,7 +162,7 @@ private fun TwoTypeTopicSelectCardPreview() { introduce = "안녕하세요", topicExpiredDuration = System.currentTimeMillis().toDuration(DurationUnit.MILLISECONDS), topic1 = dummyTopics[0], - topic2 = dummyTopics[1], + topic2 = dummyTopics[1] ), selectTopicIdx = 0, buttonEnabled = true @@ -177,7 +177,7 @@ private fun TwoTypeTopicSelectCardNoneSelectPreview() { introduce = "안녕하세요", topicExpiredDuration = System.currentTimeMillis().toDuration(DurationUnit.MILLISECONDS), topic1 = dummyTopics[0], - topic2 = dummyTopics[1], + topic2 = dummyTopics[1] ), selectTopicIdx = -1, buttonEnabled = true diff --git a/feature/tohot/src/main/java/tht/feature/tohot/component/topic/FourTypeTopic.kt b/feature/tohot/src/main/java/tht/feature/tohot/component/topic/FourTypeTopic.kt index 9bc76e8f..f90484d1 100644 --- a/feature/tohot/src/main/java/tht/feature/tohot/component/topic/FourTypeTopic.kt +++ b/feature/tohot/src/main/java/tht/feature/tohot/component/topic/FourTypeTopic.kt @@ -61,7 +61,7 @@ fun FourTypeTopic( shape = RoundedCornerShape(56.dp) ) .padding(horizontal = 24.dp, vertical = 16.dp) - .alpha(if (isSelect || !hasSelectTopic) 100f else 0.4f), + .alpha(if (isSelect || !hasSelectTopic) 100f else 0.4f) ) { Row( modifier = Modifier.fillMaxWidth(), @@ -88,7 +88,6 @@ fun FourTypeTopic( color = colorResource(id = R.color.white_f9fafa), textAlign = TextAlign.Center ) - } } diff --git a/feature/tohot/src/main/java/tht/feature/tohot/mapper/TopicUiModelMapper.kt b/feature/tohot/src/main/java/tht/feature/tohot/mapper/TopicUiModelMapper.kt index 14dd20cd..8a28e8c8 100644 --- a/feature/tohot/src/main/java/tht/feature/tohot/mapper/TopicUiModelMapper.kt +++ b/feature/tohot/src/main/java/tht/feature/tohot/mapper/TopicUiModelMapper.kt @@ -21,7 +21,7 @@ fun DailyTopicModel.toUiModel(): TopicUiModel { fun DailyTopicListModel.toUiModel(): TopicSelectUiModel { val topicExpiredDuration = (topicResetTimeMill - System.currentTimeMillis()).toDuration(DurationUnit.MILLISECONDS) - return when(topicSelectType) { + return when (topicSelectType) { DailyTopicListModel.TopicSelectType.ONE_CHOICE -> { if (topics.isEmpty()) throw Exception("TopicSizeException") TopicSelectUiModel.OneTopic( diff --git a/feature/tohot/src/main/java/tht/feature/tohot/tohot/viewmodel/ToHotViewModel.kt b/feature/tohot/src/main/java/tht/feature/tohot/tohot/viewmodel/ToHotViewModel.kt index 7c720293..1fc9a866 100644 --- a/feature/tohot/src/main/java/tht/feature/tohot/tohot/viewmodel/ToHotViewModel.kt +++ b/feature/tohot/src/main/java/tht/feature/tohot/tohot/viewmodel/ToHotViewModel.kt @@ -353,7 +353,7 @@ class ToHotViewModel @Inject constructor( state.copy( topic = state.topic.copy( selectTopicIdx = -1, - currentTopic = selectTopic, + currentTopic = selectTopic ), loading = ToHotLoading.None, enableTimerIdx = 0 @@ -427,8 +427,8 @@ class ToHotViewModel @Inject constructor( dialogState = ToHotState.DialogState( reportMenuDialogShow = false, reportDialogShow = false, - blockDialogShow = false, - ), + blockDialogShow = false + ) ) } } @@ -650,7 +650,7 @@ class ToHotViewModel @Inject constructor( reduce { it.copy( cardVisibleState = it.cardVisibleState.copy( - cardMoveAllow = true, + cardMoveAllow = true ), dialogState = it.dialogState.copy( reportMenuDialogShow = false, @@ -667,7 +667,7 @@ class ToHotViewModel @Inject constructor( reduce { it.copy( cardVisibleState = it.cardVisibleState.copy( - cardMoveAllow = false, + cardMoveAllow = false ), dialogState = it.dialogState.copy( reportMenuDialogShow = true @@ -731,7 +731,7 @@ class ToHotViewModel @Inject constructor( reduce { it.copy( cardVisibleState = it.cardVisibleState.copy( - fallingAnimationIdx = userIdx, + fallingAnimationIdx = userIdx ), dialogState = it.dialogState.copy( reportMenuDialogShow = false, @@ -779,7 +779,7 @@ class ToHotViewModel @Inject constructor( reduce { it.copy( cardVisibleState = it.cardVisibleState.copy( - fallingAnimationIdx = idx, + fallingAnimationIdx = idx ), dialogState = it.dialogState.copy( reportMenuDialogShow = false,