General: Show pro upgrade indicators on gated settings#498
Merged
Conversation
Unifies the three inconsistent pro-gating UI patterns (text button header, star-replaces-switch, silent gates) into a single inline star badge next to the title, driven by a new proLocked parameter on SettingsBaseItem that propagates to all wrappers. Switches stay visible so users can see state and disable ex-pro toggles. Hides the Noise Control visibility buttons when non-pro and surfaces a dedicated cycle customization row with the indicator. Deletes two duplicate local ProGated composables.
…lity The 'Pro' label is gplay-specific vocabulary — FOSS unlocks the same features via sponsorship. Aligns with the existing flavor-neutral terms already used in UpgradeRepo, Nav.Main.Upgrade and launchUpgrade(). Renames the proLocked parameter to requiresUpgrade across SettingsBaseItem and its three wrappers, and adds a new common_upgrade_required_label string (Requires upgrade) for the badge content description.
479b798 to
2f81c0a
Compare
Makes the inline upgrade badge a tiny star + short label (Pro on gplay, FOSS on foss) instead of icon-only. Text is flavor-switched via upgrade_badge_label in each flavor's strings.xml, primary color, labelSmall typography, no pill background to keep it lightweight when multiple rows stack it. Accessibility uses the existing common_upgrade_required_label.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Settings that require the Pro upgrade now show a small star icon next to their title, so you can see which features need Pro before tapping and getting bounced to the upgrade screen. The indicator is consistent across General Settings (theme mode/style/color), Reaction Settings (auto-play, auto-pause, auto-connect, popups) and Device Settings (sleep detection, stem actions, noise-control cycle customization). Switches remain visible, so users who had Pro and lost it can still toggle off a previously-enabled pro feature without first having to upgrade again.
Technical Context
TextButtonin the Appearance category header,star-replaces-switchin Reactions/Sleep Detection, and silent gates in Noise Control/Stem Actions) into a singleproLockedparameter onSettingsBaseItemthat renders a 16 dp primary-tinted star inline after the title. The parameter propagates throughSettingsSwitchItem,SettingsListPreferenceItem,SettingsPreferenceItemas a one-line pass-through each.Switchvisible (instead of replacing it with the star) fixes a latent UX bug flagged by Codex review: ex-pro users with an already-enabled reaction toggle previously had to tap the row once (silent disable) and then tap it again (only then the upgrade screen appeared). TheReactionSettingsViewModel.setXxx(false)path was already "free"; the old UI just hid it.cycleMask = nullintoNoiseControlCombined, hiding the eye/eye-off visibility buttons entirely. This also side-steps a double-nav bug where tapping the OFF visibility button fired bothonCycleMaskChangeandonAllowOffChange, each independently routed throughsendProGated, producing two upgrade navigations per tap. A new dedicated "Noise Control Cycle" row appears directly below the ANC card with the standard pro indicator and routes to Upgrade on tap.ProGatedToggle/ProGatedSwitchItemcomposables fromReactionSettingsScreenandDeviceSettingsScreen. Both were near-identical switch/star-swap helpers.overview_anc_mode_requires_upgrade("Requires upgrade") as theProBadgecontentDescription(flavor-neutral), and the existingdevice_settings_listening_mode_cycle_label/descriptionfor the new cycle row.DeviceSettingsViewModel.sendProGatedasymmetry — it gates both enable and disable behind Pro for sleep detection, listening-mode cycle and allow-off, unlikeReactionSettingsViewModel. Existing behavior, not addressed here.Review checklist
Switchand the inline star (not one-or-the-other).