Fix hiding year if not available

This commit is contained in:
h4h13 2019-11-08 21:18:15 +05:30
parent e49bea1cc9
commit 05146d6258
2 changed files with 5 additions and 5 deletions

View file

@ -139,8 +139,11 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView {
this.album = album
albumTitle.text = album.title
albumText.text = String.format("%s • %s • %s", album.artistName, MusicUtil.getYearString(album.year), MusicUtil.getReadableDurationString(MusicUtil.getTotalDuration(this, album.songs)))
if (MusicUtil.getYearString(album.year) == "-") {
albumText.text = String.format("%s • %s", album.artistName, MusicUtil.getReadableDurationString(MusicUtil.getTotalDuration(this, album.songs)))
} else {
albumText.text = String.format("%s • %s • %s", album.artistName, MusicUtil.getYearString(album.year), MusicUtil.getReadableDurationString(MusicUtil.getTotalDuration(this, album.songs)))
}
loadAlbumCover()
simpleSongAdapter.swapDataSet(album.songs)
albumDetailsPresenter.loadMore(album.artistId)

View file

@ -17,7 +17,6 @@ import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RadioButton;
import android.widget.TextView;
import androidx.annotation.CheckResult;
import androidx.annotation.ColorInt;
@ -91,8 +90,6 @@ public final class ToolbarContentTintHelper {
final View backButton = toolbar.getChildAt(i);
if (backButton instanceof ImageView) {
((ImageView) backButton).getDrawable().setColorFilter(colorFilter);
} else if (backButton instanceof TextView) {
// ((TextView) backButton).setTextColor(color);
}
}
}