-
Notifications
You must be signed in to change notification settings - Fork 0
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
이전, 다음 곡 이동 불가능 상태 UI #292
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.
데이터바인딩 쓰니까 상태관리도 잘되고 코드가 훨씬 깔끔해졌네용!! 읽기 편해졌습니다 ㅎㅎ 수고하셨어요!
</vector> | ||
|
||
</item> | ||
<item android:state_enabled="false"> |
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.
👍
var nextEnabled: Boolean = false | ||
set(value) { | ||
field = value | ||
binding.ibNext.isEnabled = value | ||
} |
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.
(단순 코멘트) 값을 유지할필요가 없다면 fun NextEnabled()
와 같이 배킹 필드가 없는 세터 함수 형태로 작성하면 더 짧은 코드로 작성할 수 있을 듯
it.copy( | ||
duration = duration, | ||
currentMusic = playlist.musics[index], | ||
isNextEnable = playlist.musics.size != index + 1, |
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.
(단순 코멘트) 리스트에는 lastIndex
라는 확장 프로퍼티도 있어
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.
LGTM!!
Issue
Overview
공통 로직은 최대한PlayerUtil.kt
에 작성 하였습니다!PlayerUtil.kt
코드가 줄었습니다Screenshot