Files
purchases-ios/Sources/Paywalls/Components/PaywallPurchaseButtonComponent.swift
T
Josh Holtz 3d86d7dbbb [Paywalls V2] Remove/replace PAYWALL_COMPONENTS compiler flag and fix OS/platform compile issues (#4727)
* We can't just remove PAYWALL_COMPONENT because we don't support macos and tv and things were failing

* Move PartialComponent outside of PaywallComponent extension

* Fix some lint errors

* Wrong thing

* Undid things i shouldn't have done

* Removed more

* Added comment

* Removed/fix some places for the check thingies

* RevenueCat module compiles on all the things

* RevenueCatUI compiles in all the platforms now

* Make all the things compile again

* Make work for visionOS

* Fix some platform and xcode version issues

* Fix failing spm ios 15 test

* Undo circleci changes

* Replace smooth with easeInOut

* Only run the thing i want

* Attempt to remove circular

* Explicit returns

* Does this pass

* This is it

* Swift 5.9 for this

* All tests again

* Undid public testing processor stuff

* Undo this too

* Swift compiler check out pill style circular

* Fixes from PR review

* Fix compile for mac
2025-01-29 11:53:25 -06:00

36 lines
790 B
Swift

//
// File.swift
//
//
// Created by Josh Holtz on 6/12/24.
//
// swiftlint:disable missing_docs
import Foundation
public extension PaywallComponent {
final class PurchaseButtonComponent: PaywallComponentBase {
let type: ComponentType
public let stack: PaywallComponent.StackComponent
public init(
stack: PaywallComponent.StackComponent
) {
self.type = .button
self.stack = stack
}
public func hash(into hasher: inout Hasher) {
hasher.combine(type)
hasher.combine(stack)
}
public static func == (lhs: PurchaseButtonComponent, rhs: PurchaseButtonComponent) -> Bool {
return lhs.type == rhs.type && lhs.stack == rhs.stack
}
}
}