Skip to content

Commit

Permalink
chore:TOP-106 lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
cwj-c committed Jan 5, 2025
1 parent 929b39c commit 171d094
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ data class DailyTopicResponse(
enum class TopicSelectType {
@SerializedName("oneChoice")
ONE_CHOICE,

@SerializedName("twoChoice")
TWO_CHOICE,

@SerializedName("fourChoice")
FOUR_CHOICE
}
Expand Down
1 change: 0 additions & 1 deletion feature/tohot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private fun OneTypeTopic(
topicUiModel: TopicUiModel,
isSelect: Boolean,
modifier: Modifier = Modifier,
onSelectTopic: (Int) -> Unit = { },
onSelectTopic: (Int) -> Unit = { }
) {
Column(
modifier = modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -88,7 +88,6 @@ fun FourTypeTopic(
color = colorResource(id = R.color.white_f9fafa),
textAlign = TextAlign.Center
)

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -427,8 +427,8 @@ class ToHotViewModel @Inject constructor(
dialogState = ToHotState.DialogState(
reportMenuDialogShow = false,
reportDialogShow = false,
blockDialogShow = false,
),
blockDialogShow = false
)
)
}
}
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 171d094

Please sign in to comment.