New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flows #13
Flows #13
Conversation
c4e722f
to
a0f3937
Compare
e8ea3bd
to
e8f048f
Compare
if Defaults.pushToken == nil { | ||
observer = Defaults.observe(\.pushToken) { _ in | ||
DispatchQueue.main.async { | ||
action() | ||
} | ||
} | ||
} else { | ||
action() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anonymcek registerUser API call sa pri prvom starte volal 2x za sebou.
action()
by default- pri setupnuti observera na push token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
takto som to mal a z nejakeho dovodu som to prehodil, ale netusim preco
if Defaults.pushToken == nil { | ||
observer = Defaults.observe(\.pushToken) { _ in | ||
DispatchQueue.main.async { | ||
action() | ||
} | ||
} | ||
} else { | ||
action() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
takto som to mal a z nejakeho dovodu som to prehodil, ale netusim preco
welcomeViewController?.onAgree = { | ||
Defaults.didRunApp = true | ||
welcomeViewController?.dismiss(animated: true) { [weak self] in | ||
self?.registerForPushNotifications() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registrujes sa len pri prvom spusteni?
@@ -0,0 +1,25 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
licka
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok dodam
@@ -50,29 +50,7 @@ final class AddressConfirmationViewController: UIViewController { | |||
Defaults.quarantineLatitude = location?.latitude | |||
Defaults.quarantineLongitude = location?.longitude | |||
|
|||
if Defaults.phoneNumber != nil, let token = Defaults.mfaToken { | |||
networkService.requestQuarantine(quarantineRequestData: QuarantineRequestData(mfaToken: token)) { [weak self] (result) in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
som slepy, alebo to nikde nemame?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MainViewController. registerForQuarantine
vynal som ten call z oboch VC's a teraz sa to vola raz po dokonceni celeho flowu
Changes
New stuff in codebase
Seamless instantiation of viewcontrollers defined in main storyboard
This dumb protocol
in cooperation with new
UIStoryboard
extension:allows us to instantiate the VC's declared in storyboard in more seamless way:
Common way of instantiating the VC from storyboard looks like this:
Here's new, type-safe way, that results into 1-liner:
Segues
All segues are now listed in enum
Segue
:Instead of using string-based APIs:
we're now able to perform segues in a type-safe way: