-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Do not merge][Paywalls] Add Badge Modifier #4596
base: main
Are you sure you want to change the base?
Conversation
1 build increased size
Paywalls 1.0 (1)
|
Item | Install Size Change |
---|---|
DYLD.String Table | ⬆️ 116.8 kB |
RevenueCatUI.StackComponentViewModel.StackComponentViewModel | ⬆️ 50.4 kB |
Code Signature | ⬆️ 41.6 kB |
RevenueCat.OfferingsFactory.OfferingsFactory | ⬆️ 23.3 kB |
RevenueCatUI.StickyFooterComponentViewModel.StickyFooterComponent... | ⬆️ 14.8 kB |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
) throws { | ||
self.component = component | ||
self.viewModels = viewModels | ||
|
||
if let badge = component.badge { | ||
badgeTextViewModel = try TextComponentViewModel( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialising the TextComponentViewModel
of the badge in the StackComponentViewModel
constructor so we can throw if necessary.
self.bottomLeft = bottomLeft.flatMap { CGFloat($0) } | ||
self.bottomRight = bottomRight.flatMap { CGFloat($0) } | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently this initialiser was not needed because we're not using explicit Doubles anywhere
e9c2afb
to
39bfe4e
Compare
@@ -128,6 +151,7 @@ struct StackComponentStyle { | |||
self.shape = shape?.shape | |||
self.border = border?.border | |||
self.shadow = shadow?.shadow | |||
self.badge = badge?.badge(stackShape: self.shape) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stack shape is only used to calculate the the corner radius of the edge-to-edge leading/trailing style badge, and make it match the parent stack.
Checklist
purchases-android
and hybridsMotivation
Description