Skip to content

Commit

Permalink
홈화면 체크리스트 디자인 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leesa-l committed Dec 29, 2023
1 parent d52c7b0 commit 05403db
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal object FormattedTimeMapper {

fun mapLocalDate(unixMillis: Long): LocalDateTime? {
return LocalDateTime.ofInstant(
Instant.ofEpochMilli(unixMillis),
Instant.ofEpochMilli(unixMillis * 1000),
TimeZone.getDefault().toZoneId()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package com.dkin.chevit.presentation.home.contents.component
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -23,7 +23,6 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import coil.request.ImageRequest
import com.dkin.chevit.presentation.home.HomeState
import com.dkin.chevit.presentation.home.model.CheckListItem
import com.dkin.chevit.presentation.resource.ChevitTheme

Expand All @@ -35,59 +34,61 @@ fun MyChecklistItem(
onLongClickItem: (id: String, title: String) -> Unit,
modifier: Modifier = Modifier,
) {
Box {
Box(
modifier = Modifier
.fillMaxWidth()
.height(90.dp)
.clip(RoundedCornerShape(12.dp))
.combinedClickable(
onClick = { onClickItem(item.id) },
onLongClick = { onLongClickItem(item.id, item.title) }
),
contentAlignment = Alignment.Center
) {
AsyncImage(
modifier = Modifier
.fillMaxSize()
.clip(RoundedCornerShape(12.dp)),
modifier = Modifier.fillMaxSize(),
model = ImageRequest.Builder(LocalContext.current)
.data(item.backgroundUrl)
.crossfade(true)
.build(),
contentDescription = "",
contentScale = ContentScale.FillHeight
contentScale = ContentScale.FillBounds
)
Box(modifier = Modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.combinedClickable(
onClick = { onClickItem(item.id) },
onLongClick = { onLongClickItem(item.id, item.title) }
)
Box(
modifier = modifier
.fillMaxSize()
.background(color = ChevitTheme.colors.dimThin)
.padding(vertical = 12.5.dp, horizontal = 14.5.dp),
) {
Column(
modifier = modifier
Box(
modifier = Modifier
.fillMaxWidth()
.padding(vertical = 12.5.dp, horizontal = 14.5.dp),
.heightIn(min = 26.dp),
contentAlignment = Alignment.CenterEnd,
) {
Box(
modifier = Modifier
.fillMaxWidth()
.heightIn(min = 26.dp),
contentAlignment = Alignment.CenterEnd,
) {
if (item.isProgress) {
Box(
modifier = Modifier
.background(
color = ChevitTheme.colors.grey10,
shape = RoundedCornerShape(100.dp),
)
.border(
width = 1.dp,
color = ChevitTheme.colors.grey4,
shape = RoundedCornerShape(100.dp),
)
.padding(horizontal = 14.dp, vertical = 4.dp),
contentAlignment = Alignment.Center,
) {
Text(
text = "진행중",
style = ChevitTheme.typhography.bodySmall.copy(color = ChevitTheme.colors.white),
if (item.isProgress) {
Box(
modifier = Modifier
.background(
color = ChevitTheme.colors.grey10,
shape = RoundedCornerShape(100.dp),
)
}
.border(
width = 1.dp,
color = ChevitTheme.colors.grey4,
shape = RoundedCornerShape(100.dp),
)
.padding(horizontal = 14.dp, vertical = 4.dp),
contentAlignment = Alignment.Center,
) {
Text(
text = "진행중",
style = ChevitTheme.typhography.bodySmall.copy(color = ChevitTheme.colors.white),
)
}
}
}
Column(modifier = Modifier.fillMaxSize(), verticalArrangement = Arrangement.Bottom) {
Text(
text = item.title,
style = ChevitTheme.typhography.headlineSmall.copy(color = ChevitTheme.colors.white),
Expand All @@ -97,6 +98,7 @@ fun MyChecklistItem(
style = ChevitTheme.typhography.bodySmall.copy(color = ChevitTheme.colors.white),
)
}

}
}
}

0 comments on commit 05403db

Please sign in to comment.