-
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
음원 파일 업로드 (유저 입력) #103
음원 파일 업로드 (유저 입력) #103
Conversation
android/core/ui/src/main/java/com/ohdodok/catchytape/core/ui/BindingAdapter.kt
Outdated
Show resolved
Hide resolved
android/core/ui/src/main/java/com/ohdodok/catchytape/core/ui/BindingAdapter.kt
Outdated
Show resolved
Hide resolved
<resources> | ||
<string-array name="genre_items"> | ||
<item>장르를 선택해 주세요.</item> | ||
<item>genre1</item> | ||
<item>genre2</item> | ||
<item>genre3</item> |
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.
서버 api 가 아직 없는 상황에서, 아무것도 선택안한 경우, 버튼 비활성화를 고려해서 넣었습니다~
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.
서버 api가 없는 경우면 viewModel 에서 임시로 dummy 리스트를 들고있게 구현하면 나중에 더 수정하기 쉬워져
android/feature/upload/src/main/java/com/ohdodok/catchytape/feature/upload/UploadViewModel.kt
Outdated
Show resolved
Hide resolved
android/core/ui/src/main/java/com/ohdodok/catchytape/core/ui/BindingAdapter.kt
Outdated
Show resolved
Hide resolved
android/core/ui/src/main/java/com/ohdodok/catchytape/core/ui/BindingAdapter.kt
Outdated
Show resolved
Hide resolved
android/core/ui/src/main/java/com/ohdodok/catchytape/core/ui/BindingAdapter.kt
Outdated
Show resolved
Hide resolved
private fun observeMusicTitle() { | ||
uploadedMusicTitle.onEach { | ||
_isUploadEnable.value = uploadedMusicGenrePosition.value != 0 && it.isNotEmpty() | ||
}.launchIn(viewModelScope) | ||
} | ||
|
||
|
||
private fun observeGenrePosition() { | ||
uploadedMusicGenrePosition.onEach { | ||
_isUploadEnable.value = it != 0 && uploadedMusicTitle.value.isNotEmpty() | ||
}.launchIn(viewModelScope) | ||
} |
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.
이 부분은 flow의 combine을 이용해서 해결하는 게 더 깔끔할 거 같아
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.
혹시 0번 포지션은 "선택 없음"이 아니라 "디폴트"값이 아닐까?
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.
combine 해볼게요~
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.
선택하지 않은 경우를 0으로 가정하였습니다~
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.
다른 화면에서도 사용가능성 고려 및
애써서, core-ui 로 모듈을 나누어 놨으니, ui 관련은 모아두는 게 적합하다고 생각했어요~
Issue
Overview
Screenshot