Skip to content
Snippets Groups Projects
Commit c7012099 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Update ContactView

parent b65e5aea
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!68Messenger example - send auth request
...@@ -62,15 +62,6 @@ public struct ContactView: View { ...@@ -62,15 +62,6 @@ public struct ContactView: View {
Spacer() Spacer()
Image(systemName: "person.fill.questionmark") Image(systemName: "person.fill.questionmark")
} }
Button {
viewStore.send(.sendRequestTapped)
} label: {
HStack {
Text("Send request")
Spacer()
Image(systemName: "chevron.forward")
}
}
case .requesting: case .requesting:
HStack { HStack {
...@@ -93,15 +84,6 @@ public struct ContactView: View { ...@@ -93,15 +84,6 @@ public struct ContactView: View {
Image(systemName: "xmark.diamond.fill") Image(systemName: "xmark.diamond.fill")
.foregroundColor(.red) .foregroundColor(.red)
} }
Button {
viewStore.send(.sendRequestTapped)
} label: {
HStack {
Text("Resend request")
Spacer()
Image(systemName: "paperplane")
}
}
case .verificationInProgress: case .verificationInProgress:
HStack { HStack {
...@@ -154,8 +136,17 @@ public struct ContactView: View { ...@@ -154,8 +136,17 @@ public struct ContactView: View {
Image(systemName: "eye.slash") Image(systemName: "eye.slash")
} }
} }
Button {
viewStore.send(.sendRequestTapped)
} label: {
HStack {
Text("Send request")
Spacer()
Image(systemName: "chevron.forward")
}
}
} header: { } header: {
Text("Auth status") Text("Auth")
} }
.animation(.default, value: viewStore.dbContact?.authStatus) .animation(.default, value: viewStore.dbContact?.authStatus)
} }
...@@ -167,6 +158,7 @@ public struct ContactView: View { ...@@ -167,6 +158,7 @@ public struct ContactView: View {
state: \.sendRequest, state: \.sendRequest,
action: ContactAction.sendRequest action: ContactAction.sendRequest
), ),
mapState: replayNonNil(),
onDeactivate: { viewStore.send(.sendRequestDismissed) }, onDeactivate: { viewStore.send(.sendRequestDismissed) },
destination: SendRequestView.init(store:) destination: SendRequestView.init(store:)
)) ))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment