diff --git a/app/src/main/kotlin/com/chipichipi/dobedobe/onboarding/OnboardingScreen.kt b/app/src/main/kotlin/com/chipichipi/dobedobe/onboarding/OnboardingScreen.kt index fec5f6dc..a0fc5ce2 100644 --- a/app/src/main/kotlin/com/chipichipi/dobedobe/onboarding/OnboardingScreen.kt +++ b/app/src/main/kotlin/com/chipichipi/dobedobe/onboarding/OnboardingScreen.kt @@ -70,10 +70,9 @@ private fun OnboardingScreen( // TODO : 클릭 시 Goal DB에 저장 필요 DobeDobeTextButton( - modifier = - Modifier - .fillMaxWidth() - .heightIn(54.dp), + modifier = Modifier + .fillMaxWidth() + .heightIn(54.dp), onClick = completeOnboarding, ) { // TODO : Writing 수정 필요 diff --git a/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/AsyncImage.kt b/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/AsyncImage.kt index 794fe018..2cfa0e76 100644 --- a/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/AsyncImage.kt +++ b/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/AsyncImage.kt @@ -48,11 +48,10 @@ fun DobDobeAsyncImage( val imageLoader = rememberAsyncImagePainter( - model = - ImageRequest.Builder(LocalContext.current) - .data(model) - .crossfade(true) - .build(), + model = ImageRequest.Builder(LocalContext.current) + .data(model) + .crossfade(true) + .build(), contentScale = contentScale, onState = { state -> imagePainterState = state }, ) @@ -65,9 +64,11 @@ fun DobDobeAsyncImage( is AsyncImagePainter.State.Loading -> { onLoading() } + is AsyncImagePainter.State.Error -> { onError() } + is AsyncImagePainter.State.Empty, is AsyncImagePainter.State.Success, -> Unit diff --git a/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/Button.kt b/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/Button.kt index b42a6d70..f47205b8 100644 --- a/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/Button.kt +++ b/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/Button.kt @@ -29,11 +29,10 @@ fun DobeDobeTextButton( onClick = onClick, modifier = modifier, enabled = enabled, - colors = - ButtonDefaults.textButtonColors( - contentColor = Color.White, - containerColor = Color.Black, - ), + colors = ButtonDefaults.textButtonColors( + contentColor = Color.White, + containerColor = Color.Black, + ), shape = RoundedCornerShape(20.dp), contentPadding = ButtonDefaults.TextButtonContentPadding, content = content, @@ -52,11 +51,10 @@ fun DobeDobeOutlinedButton( modifier = modifier, enabled = enabled, colors = ButtonDefaults.outlinedButtonColors(), - border = - BorderStroke( - width = 1.dp, - color = MaterialTheme.colorScheme.outline, - ), + border = BorderStroke( + width = 1.dp, + color = MaterialTheme.colorScheme.outline, + ), contentPadding = ButtonDefaults.ContentPadding, content = content, ) diff --git a/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/TextField.kt b/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/TextField.kt index 35dfdb0c..3cd64094 100644 --- a/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/TextField.kt +++ b/core/designsystem/src/main/kotlin/com/chipichipi/dobedobe/core/designsystem/component/TextField.kt @@ -35,11 +35,10 @@ fun DobeDobeTextField( state = state, enabled = enabled, readOnly = readOnly, - textStyle = - TextStyle( - fontSize = 24.sp, - fontWeight = FontWeight.SemiBold, - ), + textStyle = TextStyle( + fontSize = 24.sp, + fontWeight = FontWeight.SemiBold, + ), decorator = { innerTextField -> Column( modifier = @@ -55,11 +54,10 @@ fun DobeDobeTextField( ) } }, - keyboardOptions = - KeyboardOptions( - keyboardType = keyboardType, - imeAction = imeAction, - ), + keyboardOptions = KeyboardOptions( + keyboardType = keyboardType, + imeAction = imeAction, + ), modifier = modifier, ) } diff --git a/feature/dashboard/src/main/kotlin/com/chipichipi/dobedobe/feature/dashboard/GoalBottomSheet.kt b/feature/dashboard/src/main/kotlin/com/chipichipi/dobedobe/feature/dashboard/GoalBottomSheet.kt index 0b61dc4d..2558ff35 100644 --- a/feature/dashboard/src/main/kotlin/com/chipichipi/dobedobe/feature/dashboard/GoalBottomSheet.kt +++ b/feature/dashboard/src/main/kotlin/com/chipichipi/dobedobe/feature/dashboard/GoalBottomSheet.kt @@ -70,12 +70,9 @@ private fun GoalBottomSheetHeader() { fontWeight = FontWeight.SemiBold, ) IconButton( - modifier = - Modifier - .size(42.dp) - .offset { - IntOffset(x = 12.dp.roundToPx(), y = 0) - }, + modifier = Modifier + .size(42.dp) + .offset { IntOffset(x = 12.dp.roundToPx(), y = 0) }, onClick = {}, ) { Icon( @@ -95,10 +92,9 @@ private fun GoalBottomSheetBody( onGoalClicked: (Goal) -> Unit, ) { LazyColumn( - modifier = - Modifier - .fillMaxWidth() - .requiredHeightIn(min = 200.dp), + modifier = Modifier + .fillMaxWidth() + .requiredHeightIn(min = 200.dp), // TODO: 최소 높이 조절 필요 verticalArrangement = Arrangement.spacedBy(18.dp), contentPadding = PaddingValues(horizontal = 24.dp), @@ -120,17 +116,16 @@ private fun GoalBottomSheetContentPreview( ) { var goals by remember { mutableStateOf(pGoals) } val onGoalDone: (Goal) -> Unit = { - goals = - goals.map { goal -> - if (goal.id == it.id) { - return@map if (goal.state == Goal.State.Done) { - goal.copy(state = Goal.State.Todo) - } else { - goal.copy(state = Goal.State.Done) - } + goals = goals.map { goal -> + if (goal.id == it.id) { + return@map if (goal.state == Goal.State.Done) { + goal.copy(state = Goal.State.Todo) + } else { + goal.copy(state = Goal.State.Done) } - goal } + goal + } } GoalBottomSheetContent( goals = goals, diff --git a/feature/goal/src/main/kotlin/com/chipichipi/dobedobe/feature/goal/component/GoalRow.kt b/feature/goal/src/main/kotlin/com/chipichipi/dobedobe/feature/goal/component/GoalRow.kt index ed2274ab..809788b8 100644 --- a/feature/goal/src/main/kotlin/com/chipichipi/dobedobe/feature/goal/component/GoalRow.kt +++ b/feature/goal/src/main/kotlin/com/chipichipi/dobedobe/feature/goal/component/GoalRow.kt @@ -39,10 +39,9 @@ fun GoalRow( onClick = onGoalClicked, ) { Row( - modifier = - Modifier - .fillMaxWidth() - .padding(start = 15.dp, top = 17.dp, bottom = 18.dp, end = 15.dp), + modifier = Modifier + .fillMaxWidth() + .padding(start = 15.dp, top = 17.dp, bottom = 18.dp, end = 15.dp), verticalAlignment = Alignment.CenterVertically, ) { DobeDobeCheckBox( @@ -77,35 +76,32 @@ private fun GoalRowPreview() { DobeDobeTheme { Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { GoalRow( - goal = - Goal( - id = 1L, - title = "Todo", - isPinned = false, - state = Goal.State.Todo, - ), + goal = Goal( + id = 1L, + title = "Todo", + isPinned = false, + state = Goal.State.Todo, + ), onGoalDone = {}, onGoalClicked = {}, ) GoalRow( - goal = - Goal( - id = 1L, - title = "Done", - isPinned = false, - state = Goal.State.Done, - ), + goal = Goal( + id = 1L, + title = "Done", + isPinned = false, + state = Goal.State.Done, + ), onGoalDone = {}, onGoalClicked = {}, ) GoalRow( - goal = - Goal( - id = 1L, - title = "Pinned", - isPinned = true, - state = Goal.State.Done, - ), + goal = Goal( + id = 1L, + title = "Pinned", + isPinned = true, + state = Goal.State.Done, + ), onGoalDone = {}, onGoalClicked = {}, )