Skip to content
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

Merged
merged 13 commits into from
Dec 7, 2023
Merged

Conversation

2taezeat
Copy link
Collaborator

@2taezeat 2taezeat commented Dec 6, 2023

Issue

Overview

  • 공통 로직은 최대한 PlayerUtil.kt 에 작성 하였습니다!
  • Databinding과 viewModel에 상태를 추가해서 저장하니, PlayerUtil.kt 코드가 줄었습니다

Screenshot

스크린샷 2023-12-06 23 21 58 스크린샷 2023-12-06 23 22 11 스크린샷 2023-12-06 23 22 22 스크린샷 2023-12-06 23 22 26 스크린샷 2023-12-06 23 22 44 스크린샷 2023-12-06 23 23 16 스크린샷 2023-12-06 23 23 22 스크린샷 2023-12-06 23 23 28 스크린샷 2023-12-06 23 23 32

@2taezeat 2taezeat self-assigned this Dec 6, 2023
@2taezeat 2taezeat added ✨ feat 기능 개발 🤖 android android labels Dec 6, 2023
@2taezeat 2taezeat added this to the 🎶 music player milestone Dec 6, 2023
@2taezeat 2taezeat changed the title Android/feature/270 이전, 다음 곡 이동 불가능 상태 UI Dec 6, 2023
@2taezeat 2taezeat linked an issue Dec 6, 2023 that may be closed by this pull request
Copy link

github-actions bot commented Dec 6, 2023

Test Results

6 tests   6 ✔️  1s ⏱️
2 suites  0 💤
2 files    0

Results for commit f9cf62e.

♻️ This comment has been updated with latest results.

Copy link
Member

@youlalala youlalala left a 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">
Copy link
Member

@HamBP HamBP Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +50 to +54
var nextEnabled: Boolean = false
set(value) {
field = value
binding.ibNext.isEnabled = value
}
Copy link
Member

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(단순 코멘트) 리스트에는 lastIndex 라는 확장 프로퍼티도 있어

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영했습니다~

Copy link
Member

@HamBP HamBP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@2taezeat 2taezeat merged commit ea49508 into develop Dec 7, 2023
2 checks passed
@2taezeat 2taezeat deleted the android/feature/270 branch December 7, 2023 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android android ✨ feat 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

이전, 다음 곡 이동 불가능 상태 UI
3 participants