-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Depend on SwiftUINavigation for TextState, AlertState, etc... #1685
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,19 @@ import Combine | |
import SwiftUI | ||
import XCTestDynamicOverlay | ||
|
||
// MARK: - Deprecated after 0.45.0: | ||
|
||
@available( | ||
*, | ||
deprecated, | ||
message: "Pass 'TextState' to the 'SwiftUI.Text' initializer, instead, e.g., 'Text(textState)'." | ||
) | ||
extension TextState: View { | ||
public var body: some View { | ||
Text(self) | ||
} | ||
} | ||
|
||
// MARK: - Deprecated after 0.42.0: | ||
|
||
/// This API has been deprecated in favor of ``ReducerProtocol``. | ||
|
@@ -844,15 +857,6 @@ extension TestStore where ScopedState: Equatable, Action: Equatable { | |
|
||
// MARK: - Deprecated after 0.27.1: | ||
|
||
extension AlertState.Button { | ||
@available( | ||
*, deprecated, message: "Cancel buttons must be given an explicit label as their first argument" | ||
) | ||
public static func cancel(action: AlertState.ButtonAction? = nil) -> Self { | ||
.init(action: action, label: TextState("Cancel"), role: .cancel) | ||
} | ||
} | ||
|
||
@available(iOS 13, *) | ||
@available(macOS 12, *) | ||
@available(tvOS 13, *) | ||
|
@@ -1039,41 +1043,6 @@ extension ViewStore { | |
} | ||
} | ||
|
||
// MARK: - Deprecated after 0.23.0: | ||
|
||
extension AlertState.Button { | ||
Comment on lines
-1042
to
-1044
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same with all of this. |
||
@available(*, deprecated, renamed: "cancel(_:action:)") | ||
public static func cancel( | ||
_ label: TextState, | ||
send action: Action? | ||
) -> Self { | ||
.cancel(label, action: action.map(AlertState.ButtonAction.send)) | ||
} | ||
|
||
@available(*, deprecated, renamed: "cancel(action:)") | ||
public static func cancel( | ||
send action: Action? | ||
) -> Self { | ||
.cancel(action: action.map(AlertState.ButtonAction.send)) | ||
} | ||
|
||
@available(*, deprecated, renamed: "default(_:action:)") | ||
public static func `default`( | ||
_ label: TextState, | ||
send action: Action? | ||
) -> Self { | ||
.default(label, action: action.map(AlertState.ButtonAction.send)) | ||
} | ||
|
||
@available(*, deprecated, renamed: "destructive(_:action:)") | ||
public static func destructive( | ||
_ label: TextState, | ||
send action: Action? | ||
) -> Self { | ||
.destructive(label, action: action.map(AlertState.ButtonAction.send)) | ||
} | ||
} | ||
|
||
// MARK: - Deprecated after 0.20.0: | ||
|
||
extension AnyReducer { | ||
|
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.
This wasn't compiling so I just removed since it's so old. But I can debug it if we don't want to remove yet.