SetRequest

class SetRequest(val req: PresentationRequest, val publisher: MutableSharedFlow<PaywallState>?, val occurrence: TriggerRuleOccurrence?, val experiment: Experiment?) : PaywallViewState.Updates(source)

Binds a presentation request to the view. The experiment and presentation source are bound in the same transition as the request so that PaywallViewState.info never combines one request's placement with another request's experiment. This is the only place they are written; MergePaywall deliberately leaves them alone.

The presentation id is not touched here. Binding a request is not a presentation boundary: the same cached view can be re-bound while it is on screen (a getPaywall() call for a paywall that is already presented), and the view cannot tell that apart from the next presentation starting. The id is owned by BeginPresentation.

Parameters

experiment

The experiment this request resolved to. Required so a caller cannot silently inherit whatever the shared cached view was last bound to.

Constructors

Link copied to clipboard
constructor(req: PresentationRequest, publisher: MutableSharedFlow<PaywallState>?, occurrence: TriggerRuleOccurrence?, experiment: Experiment?)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val publisher: MutableSharedFlow<PaywallState>?
Link copied to clipboard
val req: PresentationRequest
Link copied to clipboard