mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
Follow up to #2796. This also makes `PaywallData.Configuration`'s intro strings optional. - Injected `TrialOrIntroEligibilityChecker` - Created mock `TrialOrIntroEligibilityChecker` for previews - Handling state and transitions for loading eligibility - Snapshot tests for the different new cases - Improved `SnapshotTesting` delay management - Expanded `DebugErrorView` to customize release behavior
24 lines
361 B
Swift
24 lines
361 B
Swift
//
|
|
// ViewExtensions.swift
|
|
//
|
|
//
|
|
// Created by Nacho Soto on 7/13/23.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
|
|
@available(iOS 13.0, tvOS 13.0, macOS 10.15, watchOS 6.2, *)
|
|
extension View {
|
|
|
|
@ViewBuilder
|
|
func hidden(if condition: Bool) -> some View {
|
|
if condition {
|
|
self.hidden()
|
|
} else {
|
|
self
|
|
}
|
|
}
|
|
|
|
}
|