Skip to content

Conversation

@ianrumac
Copy link
Collaborator

@ianrumac ianrumac commented Jan 22, 2026

Changes in this pull request

  • Deprecated paywallWebviewLoad_timeout - this event was causing confusion due to it's naming, leading to it being deprecated

Checklist

  • All unit tests pass.
  • All UI tests pass.
  • Demo project builds and runs.
  • I added/updated tests or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have run ktlint in the main directory and fixed any issues.
  • I have updated the SDK documentation as well as the online docs.
  • I have reviewed the contributing guide

Greptile Summary

Deprecated the paywallWebviewLoad_timeout event by removing its internal state representation and marking the public event class as deprecated. Timeout scenarios now emit PaywallWebviewLoadFail events with WebviewError.Timeout instead of a separate timeout event.

Key Changes:

  • Removed PaywallWebviewLoad.State.Timeout class and its mapping logic
  • Added @Deprecated annotations to PaywallWebviewLoadTimeout event classes
  • Removed test case validating timeout event handling
  • Updated CHANGELOG.md with deprecation notice for version 2.6.9

Impact:
The timeout scenario still functions correctly - when a paywall load times out, it now triggers a fail event rather than a distinct timeout event. This simplifies the event model while maintaining the same error handling behavior in PaywallView.kt:316.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-contained, maintain backward compatibility through deprecation annotations, and properly clean up related code including tests. The timeout functionality still works correctly by mapping to fail events.
  • No files require special attention

Important Files Changed

Filename Overview
superwall/src/main/java/com/superwall/sdk/analytics/internal/trackable/TrackableSuperwallEvent.kt Removed State.Timeout class and its mapping logic from PaywallWebviewLoad event
superwall/src/main/java/com/superwall/sdk/analytics/superwall/SuperwallEvent.kt Added @Deprecated annotation to PaywallWebviewLoadTimeout event class
superwall/src/test/java/com/superwall/sdk/analytics/internal/TrackingLogicTest.kt Removed test case for PaywallWebviewLoad.State.Timeout event handling

Sequence Diagram

sequenceDiagram
    participant PV as PaywallView
    participant WV as WebView
    participant TE as TrackableSuperwallEvent
    participant SE as SuperwallEvent
    
    Note over PV,SE: Before: Timeout Event Flow
    PV->>PV: timeout detected
    PV->>TE: PaywallWebviewLoad(State.Timeout)
    TE->>SE: PaywallWebviewLoadTimeout
    SE-->>PV: timeout event tracked
    
    Note over PV,SE: After: Timeout Now Treated as Fail
    PV->>PV: timeout detected
    PV->>TE: PaywallWebviewLoad(State.Fail(WebviewError.Timeout))
    TE->>SE: PaywallWebviewLoadFail
    SE-->>PV: fail event tracked
Loading

@ianrumac ianrumac merged commit c45577b into develop Jan 23, 2026
1 of 2 checks passed
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.

2 participants