Hide expiration label for auto-renewing subscribers#5263
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 Automattic#3323
There was a problem hiding this comment.
Pull request overview
This PR fixes misleading “Plus expires in X days” messaging by only surfacing the expiration label when a subscription is actually expiring (i.e., cancelled/non–auto-renewing and within 30 days), aligning Profile and Automotive behavior with the account details screen’s renewal vs cancellation semantics.
Changes:
- Gate
ProfileHeaderState.expiresInonsubscription.isExpiringinProfileViewModel. - 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 1 comment.
| File | Description |
|---|---|
| modules/features/profile/src/main/java/au/com/shiftyjelly/pocketcasts/profile/ProfileViewModel.kt | Only provides expiresIn when the subscription is non–auto-renewing and within the “expiring soon” window. |
| automotive/src/main/java/au/com/shiftyjelly/pocketcasts/AutomotiveSettingsFragment.kt | Mirrors the same isExpiring gating for the Automotive settings profile header. |
| CHANGELOG.md | Documents the user-facing fix in release notes. |
| * Hide the "Plus expires in X days" label on the profile for auto-renewing subscribers | ||
| ([#5263](https://github.com/Automattic/pocket-casts-android/pull/5263)) |
There was a problem hiding this comment.
The changelog entry mentions hiding the expiration label "on the profile", but this PR also changes the Automotive settings header. Consider updating the wording to reflect all affected surfaces (e.g., profile and automotive) so release notes match the shipped behavior.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
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...