From c7012099e74858107a8287ffcf81960f68674ac1 Mon Sep 17 00:00:00 2001 From: Dariusz Rybicki <dariusz@elixxir.io> Date: Wed, 7 Sep 2022 16:07:13 +0200 Subject: [PATCH] Update ContactView --- .../Sources/ContactFeature/ContactView.swift | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/Examples/xx-messenger/Sources/ContactFeature/ContactView.swift b/Examples/xx-messenger/Sources/ContactFeature/ContactView.swift index a5f07bc0..d14271f0 100644 --- a/Examples/xx-messenger/Sources/ContactFeature/ContactView.swift +++ b/Examples/xx-messenger/Sources/ContactFeature/ContactView.swift @@ -62,15 +62,6 @@ public struct ContactView: View { Spacer() Image(systemName: "person.fill.questionmark") } - Button { - viewStore.send(.sendRequestTapped) - } label: { - HStack { - Text("Send request") - Spacer() - Image(systemName: "chevron.forward") - } - } case .requesting: HStack { @@ -93,15 +84,6 @@ public struct ContactView: View { Image(systemName: "xmark.diamond.fill") .foregroundColor(.red) } - Button { - viewStore.send(.sendRequestTapped) - } label: { - HStack { - Text("Resend request") - Spacer() - Image(systemName: "paperplane") - } - } case .verificationInProgress: HStack { @@ -154,8 +136,17 @@ public struct ContactView: View { Image(systemName: "eye.slash") } } + Button { + viewStore.send(.sendRequestTapped) + } label: { + HStack { + Text("Send request") + Spacer() + Image(systemName: "chevron.forward") + } + } } header: { - Text("Auth status") + Text("Auth") } .animation(.default, value: viewStore.dbContact?.authStatus) } @@ -167,6 +158,7 @@ public struct ContactView: View { state: \.sendRequest, action: ContactAction.sendRequest ), + mapState: replayNonNil(), onDeactivate: { viewStore.send(.sendRequestDismissed) }, destination: SendRequestView.init(store:) )) -- GitLab