From 55597e49760d2d9e2da33e520e0d436a380feee1 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Wed, 7 Jun 2023 09:22:20 -0600 Subject: [PATCH] ui: fix incorrectly aligned disc headers Fix an issue where disc headers would be at the top when no subtitle as available. I really thought that TextView.text would be null if I set it to null. Instead it becomes an empty string, breaking the visbility change. Fix it by just using the disc value. Resolves #472. --- .../org/oxycblt/auxio/detail/list/AlbumDetailListAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/oxycblt/auxio/detail/list/AlbumDetailListAdapter.kt b/app/src/main/java/org/oxycblt/auxio/detail/list/AlbumDetailListAdapter.kt index 66fc29d7c..63419e1e5 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/list/AlbumDetailListAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/list/AlbumDetailListAdapter.kt @@ -115,7 +115,7 @@ private class DiscHeaderViewHolder(private val binding: ItemDiscHeaderBinding) : binding.discNumber.text = binding.context.getString(R.string.fmt_disc_no, disc.number) binding.discName.apply { text = disc.name - isGone = text == null + isGone = disc.name == null } } else { logD("Disc is null, defaulting to no disc")