-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Refactor/#922] 오늘의 솝마디 콕찌르기 QA #923
Conversation
- di 모듈 추가 - network api 구현
- mapper 구현 - 레포지토리 인터페이스 생성 및 적용 - 힐트모듈 수정
…into feature/869
…into feature/908
|
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.
고생하셨수!
style = SoptTheme.typography.title18SB, | ||
style = typography.title18SB, |
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.
import강박에 걸려서 눈에 거슬리는 모든 흰글씨를 import하기 시작했습니다
@Stable | ||
sealed interface SnackBarUiState { | ||
|
||
@Immutable | ||
data object Anonymous : SnackBarUiState | ||
|
||
@Immutable | ||
data object Poke : SnackBarUiState | ||
} |
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.
이런 상황에서 enum이랑 sealed interface 선택할 때의 기준이 있으신가요?
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.
enum은 상수들이 여러개있을때 활용하는 편이고, ui의 상태나 경우의수 등은 sealed 사용합니다!
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.
고생하셨숨답! 포츈쿠키 다구웠다~
PokeSnackBar( | ||
icon = when (snackBarUiState) { | ||
is Poke -> ic_poke_check | ||
is Anonymous -> ic_alert | ||
}, | ||
title = when (snackBarUiState) { | ||
is Poke -> "콕 찌르기를 완료했어요." | ||
is Anonymous -> "익명 해제 시, 상대방이 나를 알 수 있어요." | ||
}, | ||
) |
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.
두번의 when문을 태우는 것 보다 위에서 변수 할당해서 쓰는건 어떤가요??
ui에 값을 결정하는 로직이 들어가는 것 보다 밖에서 정해줘서 넣는게 추후 수정할때 편할 것 같아요 :)
val (icon, title) = when (snackBarUiState) {
is Poke -> ic_poke_check to "콕찌르기를 완료했어요"
is Anonymous -> ic_alert to "익명 해제시 어쩌꾸"
}
@@ -47,10 +48,14 @@ import org.sopt.official.designsystem.SoptTheme.typography | |||
import org.sopt.official.feature.fortune.R.drawable.ic_alert | |||
|
|||
@Composable | |||
internal fun PokeSnackBar() { | |||
internal fun PokeSnackBar( | |||
@SuppressLint("ResourceType") icon: Int, |
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.
저는 이럴때 @DrawableRes
를 사용해주는데 @SuppressLint("ResourceType")
를 사용해주신 이유가 있나요??
진짜 모름. 저친구 초면이에요
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.
저도 근데 첨에 DrawableRes썼다가 다시 지웠었나? IDE가 어노테이션 추가하래서 하란대로 했더니 저거 만들어줬어요ㅎㅎ
drawableRes로 하겠쌈
What is this issue?
Reference