Skip to content

Commit

Permalink
Fix artist details reveal behaviour
Browse files Browse the repository at this point in the history
Signed-off-by: enricocid <[email protected]>
  • Loading branch information
enricocid committed Sep 16, 2018
1 parent 35c724e commit f1c7ab1
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions project/app/src/main/java/com/iven/musicplayergo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,16 @@ public void onAlbumSelected(@NonNull final Album album) {
}

public void expandArtistDetails(View v) {
if (mPlayerAdapter != null && mPlayerAdapter.isPlaying() && mPlayerAdapter.getCurrentSong() != null) {
onArtistSelected(mPlayerAdapter.getCurrentSong().artistName);
}
if (!sArtistDiscographyExpanded) {
revealView(mArtistDetails, mArtistsRecyclerView, true);
if (mPlayerAdapter != null && mPlayerAdapter.getCurrentSong() != null) {
if (!mPlayerAdapter.getCurrentSong().artistName.equals(mSelectedArtist)) {
onArtistSelected(mPlayerAdapter.getCurrentSong().artistName);
} else if (sArtistDiscographyExpanded) {
revealView(mArtistDetails, mArtistsRecyclerView, false);
} else {
revealView(mArtistDetails, mArtistsRecyclerView, false);
}
} else {
revealView(mArtistDetails, mArtistsRecyclerView, !sArtistDiscographyExpanded);
}
}

Expand Down

0 comments on commit f1c7ab1

Please sign in to comment.