You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add displayCloseButton and onDismiss options to paywall views (#913)
Depends on:
- RevenueCat/purchases-ios#3708
- RevenueCat/purchases-ios#3738
- RevenueCat/purchases-hybrid-common#746
With this PR, there's a change in functionality in the way the dismissal
of the paywall works in iOS.
In iOS I noticed there was a bug that prevented the `onDismiss` callback
from getting called when using `PaywallView` after dismissal of the
paywall, and I also noticed that the paywall was getting automatically
dismissed. In Android, I noticed the behavior was different, and the
paywall wouldn't close by itself and the `onDismiss` would be called, so
the `PaywallView` could be _dismissed_ by the developer.
Taking into account the way React Native views work, I think the
developer should have the responsability of not showing the paywall
(dimissing it). So I consider Android implemntation's the correct one.
Those PRs (RevenueCat/purchases-ios#3738 and
RevenueCat/purchases-hybrid-common#746) make
some changes in the way iOS behaves, so if the view is created from
`PaywallProxy`, which is what React Native uses to create a
`PaywallView` the view wouldn't close itself after the close button is
pressed (or a successful purchase happens). It's a change in behavior,
but I think it's a actually something we overlooked in iOS
implementation's. Also, take into account that `PaywallView` in iOS used
to do `self.dismiss`, which I believe would only work if the PaywallView
in React Native is being presented using something like Navigator, where
the dismiss event would bubble up and close the container controller.
Copy file name to clipboardExpand all lines: react-native-purchases-ui/android/src/main/java/com/revenuecat/purchases/react/ui/BasePaywallViewManager.kt
Copy file name to clipboardExpand all lines: react-native-purchases-ui/android/src/main/java/com/revenuecat/purchases/react/ui/PaywallFooterViewManager.kt
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -68,4 +68,9 @@ internal class PaywallFooterViewManager : BasePaywallViewManager<PaywallFooterVi
0 commit comments