[#404] Update to ComposableArchitecture 0.39.0 (#406)

- library updated
- all `Failed to produce diagnostics for expression` fixed
This commit is contained in:
Lukas Korba 2022-08-09 18:51:40 +02:00 committed by GitHub
parent 4f029e0ba4
commit 4c36aa39a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 50 deletions

View File

@ -2050,7 +2050,7 @@
repositoryURL = "https://github.com/pointfreeco/swift-composable-architecture";
requirement = {
kind = exactVersion;
version = 0.38.2;
version = 0.39.0;
};
};
9E2AC0FD27D8EC120042AA47 /* XCRemoteSwiftPackageReference "MnemonicSwift" */ = {

View File

@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "0ba3a562716efabb585ccb169450c5389107286b",
"version" : "0.6.0"
"revision" : "f7c8277f05f27a5bfb2f6ecccb0bad126ffcf472",
"version" : "0.7.0"
}
},
{
@ -68,8 +68,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-composable-architecture",
"state" : {
"revision" : "d0ba4b87358a11d5be26d125ef3d3d492a07d8cf",
"version" : "0.38.2"
"revision" : "108e3a536fcebb16c4f247ef92c2d7326baf9fe3",
"version" : "0.39.0"
}
},
{
@ -185,8 +185,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "f821dcbac7cb6913f8e0d1a80496d0ba0199fa81",
"version" : "0.3.0"
"revision" : "38bc9242e4388b80bd23ddfdf3071428859e3260",
"version" : "0.4.0"
}
},
{

View File

@ -44,7 +44,7 @@ struct AppView: View {
case .startup:
ZStack(alignment: .topTrailing) {
DebugView(sendAction: viewStore.send)
debugView(viewStore)
.transition(.opacity)
}
@ -84,35 +84,31 @@ struct AppView: View {
}
private extension AppView {
struct DebugView: View {
var sendAction: (AppAction) -> Void
var body: some View {
List {
Section(header: Text("Navigation Stack Routes")) {
Button("Go To Sandbox (navigation proof)") {
sendAction(.updateRoute(.sandbox))
}
Button("Go To Onboarding") {
sendAction(.updateRoute(.onboarding))
}
Button("Go To Phrase Validation Demo") {
sendAction(.updateRoute(.phraseValidation))
}
Button("Restart the app") {
sendAction(.updateRoute(.welcome))
}
Button("[Be careful] Nuke Wallet") {
sendAction(.nukeWallet)
}
@ViewBuilder func debugView(_ viewStore: AppViewStore) -> some View {
List {
Section(header: Text("Navigation Stack Routes")) {
Button("Go To Sandbox (navigation proof)") {
viewStore.send(.updateRoute(.sandbox))
}
Button("Go To Onboarding") {
viewStore.send(.updateRoute(.onboarding))
}
Button("Go To Phrase Validation Demo") {
viewStore.send(.updateRoute(.phraseValidation))
}
Button("Restart the app") {
viewStore.send(.updateRoute(.welcome))
}
Button("[Be careful] Nuke Wallet") {
viewStore.send(.nukeWallet)
}
}
.navigationBarTitle("Startup")
}
.navigationBarTitle("Startup")
}
}

View File

@ -19,25 +19,19 @@ struct OnboardingFooterView: View {
if viewStore.isFinalStep {
Button("onboarding.button.newWallet") {
withAnimation(.easeInOut(duration: animationDuration)) {
viewStore.send(.createNewWallet)
}
viewStore.send(.createNewWallet, animation: .easeInOut(duration: animationDuration))
}
.activeButtonStyle
.onboardingFooterButtonLayout()
Button("onboarding.button.importWallet") {
withAnimation(.easeInOut(duration: animationDuration)) {
viewStore.send(.importExistingWallet)
}
viewStore.send(.importExistingWallet, animation: .easeInOut(duration: animationDuration))
}
.secondaryButtonStyle
.onboardingFooterButtonLayout()
} else {
Button("Next") {
withAnimation(.easeInOut(duration: animationDuration)) {
viewStore.send(.next)
}
viewStore.send(.next, animation: .easeInOut(duration: animationDuration))
}
.primaryButtonStyle
.onboardingFooterButtonLayout()

View File

@ -28,22 +28,18 @@ struct OnboardingHeaderView: View {
HStack {
if !viewStore.isInitialStep {
Button("Back") {
withAnimation(.easeInOut(duration: animationDuration)) {
viewStore.send(.back)
}
viewStore.send(.back, animation: .easeInOut(duration: animationDuration))
}
.navigationButtonStyle
.disabled(viewStore.isInitialStep)
.frame(width: 75)
.disabled(viewStore.isInitialStep)
}
Spacer()
if !viewStore.isFinalStep {
Button("Skip") {
withAnimation(.easeInOut(duration: animationDuration)) {
viewStore.send(.skip)
}
viewStore.send(.skip, animation: .easeInOut(duration: animationDuration))
}
.navigationButtonStyle
.disabled(viewStore.isFinalStep)