fix(play): hide Premium badge on Desire Sync/Memory Lane cards when couple has premium (A-003 P3)

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 <noreply@anthropic.com>
This commit is contained in:
null 2026-06-25 10:14:14 -05:00
parent 0c67c505be
commit f8ae15a41b
1 changed files with 51 additions and 40 deletions

View File

@ -128,6 +128,7 @@ private fun PlayHubContent(
item { item {
DesireSyncCard( DesireSyncCard(
showPremiumBadge = !hasPremium,
onClick = { onPlay(if (hasPremium) AppRoute.DESIRE_SYNC else AppRoute.PAYWALL) } onClick = { onPlay(if (hasPremium) AppRoute.DESIRE_SYNC else AppRoute.PAYWALL) }
) )
} }
@ -140,6 +141,7 @@ private fun PlayHubContent(
item { item {
MemoryLaneCard( MemoryLaneCard(
showPremiumBadge = !hasPremium,
onClick = { onPlay(if (hasPremium) AppRoute.MEMORY_LANE else AppRoute.PAYWALL) } onClick = { onPlay(if (hasPremium) AppRoute.MEMORY_LANE else AppRoute.PAYWALL) }
) )
} }
@ -283,6 +285,7 @@ private fun ThisOrThatCard(
@Composable @Composable
private fun DesireSyncCard( private fun DesireSyncCard(
showPremiumBadge: Boolean = true,
onClick: () -> Unit onClick: () -> Unit
) { ) {
CloserClickableCard( CloserClickableCard(
@ -321,27 +324,31 @@ private fun DesireSyncCard(
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis overflow = TextOverflow.Ellipsis
) )
Surface( // Hide the "🔒 Premium" badge once the couple has premium access — the
shape = RoundedCornerShape(CloserRadii.Pill), // feature is unlocked for both, so the lock badge is misleading (A-003).
color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.66f) if (showPremiumBadge) {
) { Surface(
Row( shape = RoundedCornerShape(CloserRadii.Pill),
modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp), color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.66f)
horizontalArrangement = Arrangement.spacedBy(4.dp),
verticalAlignment = Alignment.CenterVertically
) { ) {
Icon( Row(
imageVector = Icons.Filled.Lock, modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp),
contentDescription = null, horizontalArrangement = Arrangement.spacedBy(4.dp),
tint = MaterialTheme.colorScheme.secondary, verticalAlignment = Alignment.CenterVertically
modifier = Modifier.size(13.dp) ) {
) Icon(
Text( imageVector = Icons.Filled.Lock,
text = "Premium", contentDescription = null,
style = MaterialTheme.typography.labelSmall, tint = MaterialTheme.colorScheme.secondary,
color = MaterialTheme.colorScheme.onSecondaryContainer, modifier = Modifier.size(13.dp)
fontWeight = FontWeight.SemiBold )
) Text(
text = "Premium",
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSecondaryContainer,
fontWeight = FontWeight.SemiBold
)
}
} }
} }
} }
@ -502,6 +509,7 @@ private fun ConnectionChallengesCard(
@Composable @Composable
private fun MemoryLaneCard( private fun MemoryLaneCard(
showPremiumBadge: Boolean = true,
onClick: () -> Unit onClick: () -> Unit
) { ) {
CloserClickableCard( CloserClickableCard(
@ -546,27 +554,30 @@ private fun MemoryLaneCard(
style = MaterialTheme.typography.titleMedium.copy(fontWeight = FontWeight.SemiBold), style = MaterialTheme.typography.titleMedium.copy(fontWeight = FontWeight.SemiBold),
color = MaterialTheme.colorScheme.onSurface color = MaterialTheme.colorScheme.onSurface
) )
Surface( // Hide the "🔒 Premium" badge once the couple has premium access (A-003).
shape = RoundedCornerShape(CloserRadii.Pill), if (showPremiumBadge) {
color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.66f) Surface(
) { shape = RoundedCornerShape(CloserRadii.Pill),
Row( color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.66f)
modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp),
horizontalArrangement = Arrangement.spacedBy(4.dp),
verticalAlignment = Alignment.CenterVertically
) { ) {
Icon( Row(
imageVector = Icons.Filled.Lock, modifier = Modifier.padding(horizontal = 10.dp, vertical = 4.dp),
contentDescription = null, horizontalArrangement = Arrangement.spacedBy(4.dp),
tint = MaterialTheme.colorScheme.secondary, verticalAlignment = Alignment.CenterVertically
modifier = Modifier.size(13.dp) ) {
) Icon(
Text( imageVector = Icons.Filled.Lock,
text = "Premium", contentDescription = null,
style = MaterialTheme.typography.labelSmall, tint = MaterialTheme.colorScheme.secondary,
color = MaterialTheme.colorScheme.onSecondaryContainer, modifier = Modifier.size(13.dp)
fontWeight = FontWeight.SemiBold )
) Text(
text = "Premium",
style = MaterialTheme.typography.labelSmall,
color = MaterialTheme.colorScheme.onSecondaryContainer,
fontWeight = FontWeight.SemiBold
)
}
} }
} }
} }