From bb3fa36922b39570f76022b217306d44c2ac577d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 11 Jan 2026 01:47:18 +0000 Subject: [PATCH] Hide genre subhead in artist view when all genres are unknown Co-authored-by: OxygenCobalt <65370175+OxygenCobalt@users.noreply.github.com> --- .../org/oxycblt/auxio/detail/ArtistDetailFragment.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/detail/ArtistDetailFragment.kt b/app/src/main/java/org/oxycblt/auxio/detail/ArtistDetailFragment.kt index 1b4beed14..f72501c49 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/ArtistDetailFragment.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/ArtistDetailFragment.kt @@ -45,6 +45,7 @@ import org.oxycblt.musikr.Artist import org.oxycblt.musikr.Music import org.oxycblt.musikr.MusicParent import org.oxycblt.musikr.Song +import org.oxycblt.musikr.tag.Name import timber.log.Timber as L /** @@ -147,9 +148,13 @@ class ArtistDetailFragment : DetailFragment() { if (artist.songs.isNotEmpty()) { // Information about the artist's genre(s) map to the sub-head text + // Hide the subhead if all genres are unknown (no genre tags in music files) + val hasKnownGenres = artist.genres.any { it.name is Name.Known } binding.detailSubhead.apply { - isVisible = true - text = artist.genres.resolveNames(context) + isVisible = hasKnownGenres + if (hasKnownGenres) { + text = artist.genres.resolveNames(context) + } } // In the case that this header used to he configured to have no songs,