Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Merge requests
!68
Messenger example - send auth request
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Messenger example - send auth request
feature/messenger-example-contact-request
into
development
Overview
0
Commits
32
Pipelines
0
Changes
3
Merged
Dariusz Rybicki
requested to merge
feature/messenger-example-contact-request
into
development
2 years ago
Overview
0
Commits
32
Pipelines
0
Changes
3
Expand
Refactor user search
Add contact feature
Save found contacts
Add send request feature
Send auth request
Fix saving my contact during registration
Edited
2 years ago
by
Dariusz Rybicki
0
0
Merge request reports
Viewing commit
b5bbc0ca
Prev
Next
Show latest version
3 files
+
24
−
137
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
b5bbc0ca
Update UserSearchResultFeature
· b5bbc0ca
Dariusz Rybicki
authored
2 years ago
Examples/xx-messenger/Sources/UserSearchFeature/UserSearchResultFeature.swift
0 → 100644
+
55
−
0
Options
import
ComposableArchitecture
import
Foundation
import
XCTestDynamicOverlay
import
XXClient
public
struct
UserSearchResultState
:
Equatable
,
Identifiable
{
public
init
(
id
:
Data
,
xxContact
:
XXClient
.
Contact
,
username
:
String
?
=
nil
,
email
:
String
?
=
nil
,
phone
:
String
?
=
nil
)
{
self
.
id
=
id
self
.
xxContact
=
xxContact
self
.
username
=
username
self
.
email
=
email
self
.
phone
=
phone
}
public
var
id
:
Data
public
var
xxContact
:
XXClient
.
Contact
public
var
username
:
String
?
public
var
email
:
String
?
public
var
phone
:
String
?
}
public
enum
UserSearchResultAction
:
Equatable
{
case
start
case
tapped
}
public
struct
UserSearchResultEnvironment
{
public
init
()
{}
}
#if DEBUG
extension
UserSearchResultEnvironment
{
public
static
let
unimplemented
=
UserSearchResultEnvironment
()
}
#endif
public
let
userSearchResultReducer
=
Reducer
<
UserSearchResultState
,
UserSearchResultAction
,
UserSearchResultEnvironment
>
{
state
,
action
,
env
in
switch
action
{
case
.
start
:
state
.
username
=
try
?
state
.
xxContact
.
getFact
(
.
username
)?
.
fact
state
.
email
=
try
?
state
.
xxContact
.
getFact
(
.
email
)?
.
fact
state
.
phone
=
try
?
state
.
xxContact
.
getFact
(
.
phone
)?
.
fact
return
.
none
case
.
tapped
:
return
.
none
}
}
Loading