Skip to content
Snippets Groups Projects

Messenger example - send auth request

Merged Dariusz Rybicki requested to merge feature/messenger-example-contact-request into development
3 files
+ 51
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -79,7 +79,18 @@ public let contactReducer = Reducer<ContactState, ContactAction, ContactEnvironm
return .none
case .saveFactsTapped:
return .none
guard let xxContact = state.xxContact else { return .none }
return .fireAndForget { [state] in
var dbContact = state.dbContact ?? XXModels.Contact(id: state.id)
dbContact.marshaled = xxContact.data
dbContact.username = xxContact.username
dbContact.email = xxContact.email
dbContact.phone = xxContact.phone
_ = try! env.db().saveContact(dbContact)
}
.subscribe(on: env.bgQueue)
.receive(on: env.mainQueue)
.eraseToEffect()
case .sendRequestTapped:
return .none
Loading