fix: don't show empty year TextView if album has no year

This commit is contained in:
Jaime García 2025-08-07 02:56:44 +02:00
parent 1f347209b5
commit cc4d4701e1
No known key found for this signature in database
GPG key ID: BC4E5F71A71BDA5B

View file

@ -144,7 +144,7 @@ public class AlbumPageFragment extends Fragment implements ClickCallback {
bind.albumNameLabel.setText(album.getName()); bind.albumNameLabel.setText(album.getName());
bind.albumArtistLabel.setText(album.getArtist()); bind.albumArtistLabel.setText(album.getArtist());
bind.albumReleaseYearLabel.setText(album.getYear() != 0 ? String.valueOf(album.getYear()) : ""); bind.albumReleaseYearLabel.setVisibility(album.getYear() != 0 ? View.VISIBLE : View.GONE);
bind.albumSongCountDurationTextview.setText(getString(R.string.album_page_tracks_count_and_duration, album.getSongCount(), album.getDuration() != null ? album.getDuration() / 60 : 0)); bind.albumSongCountDurationTextview.setText(getString(R.string.album_page_tracks_count_and_duration, album.getSongCount(), album.getDuration() != null ? album.getDuration() / 60 : 0));
if (album.getGenre() != null && !album.getGenre().isEmpty()) { if (album.getGenre() != null && !album.getGenre().isEmpty()) {
bind.albumGenresTextview.setText(album.getGenre()); bind.albumGenresTextview.setText(album.getGenre());