Skip to content

Commit

Permalink
PaywallColor: change visibility of Color.init(light:dark:) to `pr…
Browse files Browse the repository at this point in the history
…ivate` (#3345)

Fixes #3344.

This wasn't meant to be `public` as it's only used within the
`RevenueCat` framework and can lead to conflicts.
  • Loading branch information
NachoSoto authored Oct 26, 2023
1 parent ed80980 commit db8a673
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Sources/Paywalls/PaywallColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,16 @@ private extension Color {
self.init(UIColor(light: light, dark: dark))
}

}

@available(iOS 13.0, tvOS 13.0, macOS 10.15, watchOS 6.2, *)
public extension Color {

/// Creates a `Color` given a light and a dark `Color`.
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
init(light: Color, dark: Color) {
self.init(light: UIColor(light), dark: UIColor(dark))
}

}

@available(iOS 13.0, tvOS 13.0, macOS 10.15, watchOS 6.2, *)
public extension Color {

/// Converts a `Color` into a `PaywallColor`.
/// - Warning: This `PaywallColor` won't be able to be encoded,
/// its ``PaywallColor/stringRepresentation`` will be undefined.
Expand Down

0 comments on commit db8a673

Please sign in to comment.