Skip to content

Commit

Permalink
refactor : list.size 대신, lastIndex 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
2taezeat committed Dec 7, 2023
1 parent 0ebd68b commit f9cf62e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class PlayerViewModel @Inject constructor(
it.copy(
duration = duration,
currentMusic = playlist.musics[index],
isNextEnable = playlist.musics.size != index + 1,
isNextEnable = playlist.musics.lastIndex != index,
isPreviousEnable = index != 0
)
}
Expand Down

0 comments on commit f9cf62e

Please sign in to comment.