Skip to content

Remove_placements: Remove paywalls field from ApphudUser#146

Merged
aaudin90 merged 3 commits intomasterfrom
Remove_placements
Mar 9, 2026
Merged

Remove_placements: Remove paywalls field from ApphudUser#146
aaudin90 merged 3 commits intomasterfrom
Remove_placements

Conversation

@aaudin90
Copy link
Collaborator

@aaudin90 aaudin90 commented Mar 7, 2026

Remove the paywalls property from ApphudUser and all related public APIs (rawPaywalls, paywallsDidLoadCallback, paywallClosed, paywallsDidFullyLoad listener callback). Paywalls are now accessed exclusively through placements.

  • Remove paywalls from ApphudUser, CustomerDto, CustomerMapper, RegistrationBody, and SharedPreferencesStorage migration
  • Remove need_paywalls request field, rename to needPlacements
  • Update all internal logic to use placements instead of paywalls: ApphudInternal, fallback handling, product loading, purchases, restore purchases
  • Extract findPaywallScreenId helper in ApphudInternal+Purchases to eliminate duplicated paywall lookup logic
  • Use firstNotNullOfOrNull in PaywallRepository for consistency and to avoid intermediate list allocation
  • Update demos and all unit tests accordingly

@aaudin90 aaudin90 force-pushed the Remove_placements branch from 2d2692e to 2d1bdf1 Compare March 9, 2026 13:03
aaudin90 and others added 3 commits March 9, 2026 16:09
Remove paywalls from ApphudUser, CustomerDto, CustomerMapper.
Update UserRepository to merge only placements (not paywalls).
Update PaywallRepository to search paywalls via placements.
Remove need_paywalls from RegistrationBody, rename needPaywalls
parameter to needPlacements across RegistrationBodyFactory,
RemoteRepository, and RegistrationUseCase.
Simplify SharedPreferencesStorage migration to placements only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove rawPaywalls(), paywallsDidLoadCallback(), paywallClosed()
from Apphud.kt. Remove paywallsDidFullyLoad from ApphudListener.
Update ApphudInternal to use placements instead of paywalls for
cache checks, readiness checks, retry logic, and log messages.
Simplify allAvailableProductIds to use placements and groups only.
Update fallback flow to wrap paywalls into placements.
Remove paywallClosed/paywallClosedSuspend from RequestManager.
Rename needPaywalls to needPlacements in RequestManager.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove paywalls parameter from ApphudUser test fixtures.
Simplify UserRepositoryTest to verify placements-only merge logic.
Update RegistrationUseCaseTest to remove paywalls preservation tests.
Update RemoteRepositoryTest to use needPlacements parameter.
Update SharedPreferencesStorageMigrationTest for placements-only migration.
Remove paywallsDidFullyLoad callback from demo apps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aaudin90 aaudin90 force-pushed the Remove_placements branch from 2d1bdf1 to c48bedd Compare March 9, 2026 13:10
@aaudin90 aaudin90 merged commit 9e78a8b into master Mar 9, 2026
2 checks passed
@aaudin90 aaudin90 deleted the Remove_placements branch March 9, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant