Hide expiration label for auto-renewing subscribers#5329
Conversation
The profile and automotive headers gated the "Plus expires in X days" label only on the remaining duration being under 30 days, with no check for whether the subscription was set to auto-renew. Monthly subscribers always have an expiry date within ~30 days of the current moment (the next renewal), so the label was shown every day of an active monthly subscription, leading users to believe their subscription had been cancelled. Use the existing `Subscription.isExpiring` property — `!isAutoRenewing && expiryDate < now + 30 days` — as the gate, matching how `AccountDetailsViewModel` already distinguishes renewing vs cancelled subscriptions when picking between "Next Payment" and "Plus expires on". Fixes #3323
Generated by 🚫 Danger |
There was a problem hiding this comment.
Pull request overview
Fixes misleading subscription messaging on the Profile and Automotive settings headers by only showing the “Plus expires in X days” label when a subscription is genuinely expiring (i.e., not auto-renewing and within the 30-day window), aligning behavior with the existing Account Details semantics.
Changes:
- Gate
expiresIninProfileViewModelonsubscription.isExpiring. - Apply the same
isExpiringgate to the Automotive settings header state. - Add a changelog entry describing the user-facing behavior change.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| modules/features/profile/src/main/java/au/com/shiftyjelly/pocketcasts/profile/ProfileViewModel.kt | Stops showing the expiry label for active auto-renewing subscribers by gating expiresIn on Subscription.isExpiring. |
| automotive/src/main/java/au/com/shiftyjelly/pocketcasts/AutomotiveSettingsFragment.kt | Applies the same isExpiring gating to the Automotive profile header so behavior matches the main app. |
| CHANGELOG.md | Documents the user-visible fix in the 8.12 bug fixes section. |
|
@copilot resolve the merge conflicts in this pull request |
Resolved the merge conflict in |
Resolve conflict in ProfileViewModel.kt by keeping both the isExpiring gating (from this branch) and the new isShareVisible field (from main).
Description
Fixes #3323
The profile and automotive screens gate the "Plus expires in X days" label only on whether the remaining duration is under 30 days, without checking whether the subscription is set to auto-renew. Monthly subscribers always have an expiry date within ~30 days of "now" (the next renewal), so the expiration label was being shown every single day of an active monthly subscription — leading users to believe their subscription had been cancelled.
This wires up the existing (but previously unused)
Subscription.isExpiringproperty —!isAutoRenewing && expiryDate < now + 30 days— as the gate. The semantics match howAccountDetailsViewModelalready distinguishes between "Next Payment" (auto-renewing) and "Plus expires on …" (cancelled) on the account details screen, so behavior is consistent across the two screens.The fix applies uniformly to Google Play and Paddle (Web) subscribers — both populate
isAutoRenewingfrom the same serverautoRenewingboolean with no platform-specific branching.Changes
ProfileViewModel.profileHeaderState: only setexpiresInwhensubscription.isExpiring == true.AutomotiveSettingsFragmentheader state: same gate.Testing Instructions
./gradlew :automotive:installDebug) and open the settings screen.Screenshots or Screencast
To be added — repro on emulator with a monthly auto-renew test account.
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xml(no string changes)I have tested any UI changes...