-
Notifications
You must be signed in to change notification settings - Fork 1
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
친구 검색 시 팔로우 / 팔로잉 버튼이 보이도록 구현 #70
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🔥
if (item.isFollowing) { | ||
Box(modifier = Modifier | ||
.clip(RoundedCornerShape(10.dp)) | ||
.background(Color(0xFFE4E4E4)) | ||
.clickable { | ||
viewModel.unFollow(item.user) | ||
} | ||
.padding(horizontal = 12.dp, vertical = 5.dp)) { | ||
Text( | ||
text = "팔로잉", | ||
style = WalkieTypography.Body2, | ||
) | ||
} | ||
} else { | ||
Box(modifier = Modifier | ||
.clip(RoundedCornerShape(10.dp)) | ||
.background(WalkieColor.Primary) | ||
.clickable { | ||
viewModel.follow(item.user) | ||
} | ||
.padding(horizontal = 12.dp, vertical = 5.dp)) { | ||
Text( | ||
text = "팔로우", | ||
style = WalkieTypography.Body2.copy( | ||
Color.White | ||
), | ||
) | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
색상과 문자열 빼곤 컴포넌트의 모양과 액션이 동일하기 때문에 별도의 컴포저블로 분리하는게 어떨까 싶습니다 😎
if (item.isFollowing) { | |
Box(modifier = Modifier | |
.clip(RoundedCornerShape(10.dp)) | |
.background(Color(0xFFE4E4E4)) | |
.clickable { | |
viewModel.unFollow(item.user) | |
} | |
.padding(horizontal = 12.dp, vertical = 5.dp)) { | |
Text( | |
text = "팔로잉", | |
style = WalkieTypography.Body2, | |
) | |
} | |
} else { | |
Box(modifier = Modifier | |
.clip(RoundedCornerShape(10.dp)) | |
.background(WalkieColor.Primary) | |
.clickable { | |
viewModel.follow(item.user) | |
} | |
.padding(horizontal = 12.dp, vertical = 5.dp)) { | |
Text( | |
text = "팔로우", | |
style = WalkieTypography.Body2.copy( | |
Color.White | |
), | |
) | |
} | |
} | |
} | |
@Composable | |
private fun followButton( | |
modifier: Modifier = Modifier, | |
isFollowing: Boolean, | |
onClick: () -> Unit, | |
) { | |
Box( | |
modifier = modifier | |
.clip(RoundedCornerShape(10.dp)) | |
.background(if(isFollowing) Color(0xFFE4E4E4) else WalkieTypography.Body2) | |
.padding(horizontal = 12.dp, vertical = 6.dp) | |
.clickable(onClick = onClick), | |
) { | |
Text( | |
text = if (isFollowing) "팔로잉" else "팔로우", | |
style = WalkieTypography.Body2, | |
color = if(isFollowing) Color.Black else Color.White, | |
) | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mangbaam
오예~ 명범님 감사합니다~~! ㅋㅋㅋㅋㅋㅋㅋ
style = WalkieTypography.Body2.copy( | ||
Color.White | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 하면 글자색 하얀색으로 고정되지 않나요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아.. 그러네요,,, 감사해요 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋㅋㅋ KMP 기대하고 있겠습니다~ ㅋㅋㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아.. ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 하게되면 알려드릴게요,,, ㅋㅋㅋㅋㅋㅋ
다른 거 KMP로 만들고 있긴한데 파이어베이스쪽만 문제라서
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋㅋㅋ 저도 나중에 여유있으면 사이드로 함 해보려구요 ㅋㅋㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋㅋ 화이팅입니다 >< 리뷰해주셔서 감사해요~~!!!
😎 작업 내용
🧐 변경된 내용
🥳 동작 화면
🤯 이슈 번호
🥲 비고