Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

스토리 - '나' 일 때 미션 미인증 시 반투명 처리 #81

Merged
merged 2 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ import com.goalpanzi.mission_mate.core.designsystem.theme.MissionMateTypography
import com.goalpanzi.mission_mate.core.designsystem.theme.MissionmateTheme
import com.goalpanzi.mission_mate.core.designsystem.theme.OrangeGradient_FFFF5F3C_FFFFAE50
import com.goalpanzi.mission_mate.feature.board.model.CharacterUiModel
import com.goalpanzi.mission_mate.feature.board.model.MissionState
import com.goalpanzi.mission_mate.feature.board.model.UserStory

@Composable
fun BoardTopStory(
userList: List<UserStory>,
modifier: Modifier = Modifier,
missionState : MissionState,
onClickStory: (UserStory) -> Unit,
modifier: Modifier = Modifier,
) {
LazyRow(
modifier = modifier,
Expand All @@ -57,6 +59,7 @@ fun BoardTopStory(
items(userList) { userStory ->
UserStoryItem(
userStory = userStory,
isProgressMission = missionState.isVisiblePiece(),
onClickStory = onClickStory
)
}
Expand All @@ -77,12 +80,14 @@ fun BoardTopStory(
fun UserStoryItem(
userStory: UserStory,
onClickStory: (UserStory) -> Unit,
isProgressMission: Boolean,
modifier: Modifier = Modifier,
) {
Box(
modifier = modifier
.height(98.dp)
.widthIn(min = 70.dp),
.widthIn(min = 70.dp)
.alpha(if(!isProgressMission && userStory.isMe) 1f else userStory.userStoryAlpha),
contentAlignment = Alignment.TopCenter
) {
StableImage(
Expand All @@ -106,7 +111,6 @@ fun UserStoryItem(
)
} else {
Modifier
.alpha(userStory.userStoryAlpha)
.border(3.dp, ColorWhite_FFFFFFFF, CircleShape)

}
Expand Down Expand Up @@ -168,6 +172,7 @@ private fun VerifiedUserStoryItemPreview() {
viewedAt = "",
missionVerificationId = 0
),
isProgressMission = true,
onClickStory = {

}
Expand All @@ -190,6 +195,7 @@ private fun VerifiedViewedUserStoryItemPreview() {
viewedAt = "2024-10-31T09:48:18.399Z",
missionVerificationId = 0
),
isProgressMission = true,
onClickStory = {

}
Expand All @@ -211,6 +217,7 @@ private fun NotVerifiedUserStoryItemPreview() {
viewedAt = "",
missionVerificationId = 0
),
isProgressMission = true,
onClickStory = {

}
Expand All @@ -234,6 +241,7 @@ private fun MyVerifiedUserStoryItemPreview() {
viewedAt = "",
missionVerificationId = 0
),
isProgressMission = true,
onClickStory = {

}
Expand All @@ -256,6 +264,7 @@ private fun MyVerifiedViewedUserStoryItemPreview() {
viewedAt = "2024-10-31T09:48:18.399Z",
missionVerificationId = 0
),
isProgressMission = true,
onClickStory = {

}
Expand All @@ -278,6 +287,7 @@ private fun MyNotVerifiedUserStoryItemPreview() {
viewedAt = "",
missionVerificationId = 0
),
isProgressMission = true,
onClickStory = {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ fun BoardTopView(
BoardTopStory(
modifier = Modifier.padding(top = 56.dp),
userList = userList,
onClickStory = onClickStory
missionState = missionState,
onClickStory = onClickStory,
)
if(!viewedTooltip){
if (isAddingUserEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ data class UserStory(
UserStoryType.COLORED
}
} else {
if (isMe) {
UserStoryType.NORMAL
} else {
UserStoryType.TRANSPARENT
}
UserStoryType.TRANSPARENT
}

val userStoryAlpha = when (userStoryType) {
Expand Down