Skip to content

Commit

Permalink
Show unique artist_id and name pairs only once in TrackRow (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
chvp authored Jul 31, 2021
1 parent 183b415 commit 7b7fb90
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ fun TrackRow(
Text(stringResource(R.string.go_to_album))
}
}
val used = HashSet<Pair<Int, String>>()
for (ta in track.trackArtists.sortedBy { ta -> ta.order }) {
if (ta.artistId != hideArtist) {
if (ta.artistId != hideArtist && !used.contains(Pair(ta.artistId, ta.name))) {
used.add(Pair(ta.artistId, ta.name))
DropdownMenuItem(
onClick = {
expanded = false
Expand Down

0 comments on commit 7b7fb90

Please sign in to comment.