Skip to content

Commit

Permalink
chore:TOP-107 lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
cwj-c committed Dec 29, 2024
1 parent 15f85e6 commit f467a4c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private fun ToHotCardPreview() {
initialDelay = 1.toDuration(DurationUnit.NANOSECONDS),
completionDelay = 1.toDuration(DurationUnit.NANOSECONDS),
duration = 6.toDuration(DurationUnit.NANOSECONDS),
startAble = true,
startAble = true
),
enable = true,
isHoldCard = false,
Expand Down Expand Up @@ -218,7 +218,7 @@ private fun ToHotCardHoldCardPreview() {
initialDelay = 1.toDuration(DurationUnit.NANOSECONDS),
completionDelay = 1.toDuration(DurationUnit.NANOSECONDS),
duration = 6.toDuration(DurationUnit.NANOSECONDS),
startAble = true,
startAble = true
),
enable = true,
isHoldCard = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fun ToHotAnimateTimeProgressContainer(
onEnd: () -> Unit,
modifier: Modifier = Modifier,
initialDelay: Long = 0L,
completionDelay: Long = 0L,
completionDelay: Long = 0L
) {
val coroutineScope = rememberCoroutineScope()
LogComposition("cwj_debug", "ToHotAnimateTimeProgressContainer")
Expand Down Expand Up @@ -85,12 +85,12 @@ private fun ToHotAnimateTimeProgressContainerInternal(
),
progressBackgroundColor: Color = colorResource(id = tht.core.ui.R.color.black_353535),
onTicChanged: (Float) -> Unit = { },
completionDelayMillis: Long = 0L,
completionDelayMillis: Long = 0L
) {
var currentSec by remember { mutableIntStateOf(maxTimeSec) }
val destinationProgress = destinationSec / maxTimeSec.toFloat()
var color by remember(progressColor) {
mutableStateOf(progressColor.firstOrNull() ?: Color.Yellow )
mutableStateOf(progressColor.firstOrNull() ?: Color.Yellow)
}
LaunchedEffect(currentSec) {
for (i in progressColor.indices) {
Expand Down Expand Up @@ -160,6 +160,6 @@ private fun ToHotAnimateTimeProgressContainerPreview() {
enable = true,
onEnd = {},
duration = 1000,
maxTimer = 5,
maxTimer = 5
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data class CardTimerUiModel(
val completionDelay: Duration,
val duration: Duration,
val startAble: Boolean, // card image loading 이 완료 후 timer 실행을 위한 속성
val timerType: ToHotTimer = ToHotTimer.Timer,
val timerType: ToHotTimer = ToHotTimer.Timer
) {
enum class ToHotTimer {
Timer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fun ToHotScreenPreview() {
initialDelay = 1.toDuration(DurationUnit.NANOSECONDS),
completionDelay = 1.toDuration(DurationUnit.NANOSECONDS),
duration = 6.toDuration(DurationUnit.NANOSECONDS),
startAble = true,
startAble = true
),
enableTimerIdx = 0,
cardMoveAllow = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,15 +467,15 @@ class ToHotViewModel @Inject constructor(
}
}
}

fun userCardLoadFinishEvent(idx: Int, result: Boolean, error: Throwable?) {
Log.d(TAG, "userCardLoadFinishEvent => $idx, $result")
error?.printStackTrace()
userCardLoadedIdxSet.add(idx)
intent {
reduce {
it.copy(
timer = createDefaultTimer(startAble = true),
timer = createDefaultTimer(startAble = true)
)
}
}
Expand All @@ -486,6 +486,7 @@ class ToHotViewModel @Inject constructor(
if (userIdx != enableTimerIdx) return@with
tryScrollToNext(userIdx)
}

/**
* timer tic 이 변경될 때 호출
* - timer 가 0이면 다음 유저 스크롤
Expand Down Expand Up @@ -848,15 +849,15 @@ class ToHotViewModel @Inject constructor(

private fun createDefaultTimer(
startAble: Boolean = false,
timerType: CardTimerUiModel.ToHotTimer = CardTimerUiModel.ToHotTimer.Timer,
timerType: CardTimerUiModel.ToHotTimer = CardTimerUiModel.ToHotTimer.Timer
): CardTimerUiModel {
return CardTimerUiModel(
maxTimer = MAX_TIMER_MILL.toDuration(DurationUnit.MILLISECONDS),
initialDelay = TIMER_INITIAL_DELAY_MILL.toDuration(DurationUnit.MILLISECONDS),
completionDelay = TIMER_COMPLETION_DELAY_MILL.toDuration(DurationUnit.MILLISECONDS),
duration = TIMER_DURATION_MILL.toDuration(DurationUnit.MILLISECONDS),
startAble = startAble,
timerType = timerType,
timerType = timerType
)
}

Expand Down

0 comments on commit f467a4c

Please sign in to comment.