Skip to content

Commit

Permalink
Merge pull request #81 from Nexters/fix/mod-story-by-host
Browse files Browse the repository at this point in the history
스토리 - '나' 일 때 미션 미인증 시 반투명 처리
  • Loading branch information
eshc123 authored Dec 22, 2024
2 parents 847b766 + 4197fc1 commit a294c72
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
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

0 comments on commit a294c72

Please sign in to comment.