From f1fdefb987b0ce1b10f3c524f005cff035a5f117 Mon Sep 17 00:00:00 2001 From: null Date: Thu, 25 Jun 2026 10:14:14 -0500 Subject: [PATCH] fix(play): hide Premium badge on Desire Sync/Memory Lane cards when couple has premium (A-003 P3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Threaded showPremiumBadge=!hasPremium into DesireSyncCard/MemoryLaneCard and gated the lock badge behind it. The feature was already accessible (A-001) — only the static badge was misleading. Verified: with couple premium the Play hub shows no Premium badge on them. Co-Authored-By: Claude Opus 4.8 --- .../java/app/closer/ui/play/PlayHubScreen.kt | 91 +++++++++++-------- 1 file changed, 51 insertions(+), 40 deletions(-) diff --git a/app/src/main/java/app/closer/ui/play/PlayHubScreen.kt b/app/src/main/java/app/closer/ui/play/PlayHubScreen.kt index d58bd97e..817425b9 100644 --- a/app/src/main/java/app/closer/ui/play/PlayHubScreen.kt +++ b/app/src/main/java/app/closer/ui/play/PlayHubScreen.kt @@ -128,6 +128,7 @@ private fun PlayHubContent( item { DesireSyncCard( + showPremiumBadge = !hasPremium, onClick = { onPlay(if (hasPremium) AppRoute.DESIRE_SYNC else AppRoute.PAYWALL) } ) } @@ -140,6 +141,7 @@ private fun PlayHubContent( item { MemoryLaneCard( + showPremiumBadge = !hasPremium, onClick = { onPlay(if (hasPremium) AppRoute.MEMORY_LANE else AppRoute.PAYWALL) } ) } @@ -283,6 +285,7 @@ private fun ThisOrThatCard( @Composable private fun DesireSyncCard( + showPremiumBadge: Boolean = true, onClick: () -> Unit ) { CloserClickableCard( @@ -321,27 +324,31 @@ private fun DesireSyncCard( maxLines = 1, overflow = TextOverflow.Ellipsis ) - Surface( - shape = RoundedCornerShape(CloserRadii.Pill), - color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.66f) - ) { - Row( - modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp), - horizontalArrangement = Arrangement.spacedBy(4.dp), - verticalAlignment = Alignment.CenterVertically + // Hide the "🔒 Premium" badge once the couple has premium access — the + // feature is unlocked for both, so the lock badge is misleading (A-003). + if (showPremiumBadge) { + Surface( + shape = RoundedCornerShape(CloserRadii.Pill), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.66f) ) { - Icon( - imageVector = Icons.Filled.Lock, - contentDescription = null, - tint = MaterialTheme.colorScheme.secondary, - modifier = Modifier.size(13.dp) - ) - Text( - text = "Premium", - style = MaterialTheme.typography.labelSmall, - color = MaterialTheme.colorScheme.onSecondaryContainer, - fontWeight = FontWeight.SemiBold - ) + Row( + modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp), + horizontalArrangement = Arrangement.spacedBy(4.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Icon( + imageVector = Icons.Filled.Lock, + contentDescription = null, + tint = MaterialTheme.colorScheme.secondary, + modifier = Modifier.size(13.dp) + ) + Text( + text = "Premium", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSecondaryContainer, + fontWeight = FontWeight.SemiBold + ) + } } } } @@ -502,6 +509,7 @@ private fun ConnectionChallengesCard( @Composable private fun MemoryLaneCard( + showPremiumBadge: Boolean = true, onClick: () -> Unit ) { CloserClickableCard( @@ -546,27 +554,30 @@ private fun MemoryLaneCard( style = MaterialTheme.typography.titleMedium.copy(fontWeight = FontWeight.SemiBold), color = MaterialTheme.colorScheme.onSurface ) - Surface( - shape = RoundedCornerShape(CloserRadii.Pill), - color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.66f) - ) { - Row( - modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp), - horizontalArrangement = Arrangement.spacedBy(4.dp), - verticalAlignment = Alignment.CenterVertically + // Hide the "🔒 Premium" badge once the couple has premium access (A-003). + if (showPremiumBadge) { + Surface( + shape = RoundedCornerShape(CloserRadii.Pill), + color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.66f) ) { - Icon( - imageVector = Icons.Filled.Lock, - contentDescription = null, - tint = MaterialTheme.colorScheme.secondary, - modifier = Modifier.size(13.dp) - ) - Text( - text = "Premium", - style = MaterialTheme.typography.labelSmall, - color = MaterialTheme.colorScheme.onSecondaryContainer, - fontWeight = FontWeight.SemiBold - ) + Row( + modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp), + horizontalArrangement = Arrangement.spacedBy(4.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Icon( + imageVector = Icons.Filled.Lock, + contentDescription = null, + tint = MaterialTheme.colorScheme.secondary, + modifier = Modifier.size(13.dp) + ) + Text( + text = "Premium", + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSecondaryContainer, + fontWeight = FontWeight.SemiBold + ) + } } } }