Skip to content

Commit

Permalink
Merge pull request #14 from wordpress-mobile/issue/updating-authentic…
Browse files Browse the repository at this point in the history
…ator-delegate

Updating Authenticator delegate
  • Loading branch information
jleandroperez authored Jul 12, 2018
2 parents 8f33c2a + be1e635 commit f04d9bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public protocol WordPressAuthenticatorDelegate: class {
/// - credentials: WordPress Site Credentials.
/// - onCompletion: Closure to be executed on completion.
///
func sync(credentials: WordPressCredentials, onCompletion: @escaping (Error?) -> Void)
func sync(credentials: WordPressCredentials, onCompletion: @escaping () -> Void)

/// Signals the Host App that a given Analytics Event has occurred.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ extension LoginSelfHostedViewController {
}

let credentials = WordPressCredentials.wporg(username: username, password: password, xmlrpc: xmlrpc, options: options)
delegate.sync(credentials: credentials) { [weak self] _ in
delegate.sync(credentials: credentials) { [weak self] in

NotificationCenter.default.post(name: Foundation.Notification.Name(rawValue: WordPressAuthenticator.WPSigninDidFinishNotification), object: nil)
self?.showLoginEpilogue(for: credentials)
Expand Down
2 changes: 1 addition & 1 deletion WordPressAuthenticator/Signin/LoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ extension LoginViewController {

configureStatusLabel(NSLocalizedString("Getting account information", comment: "Alerts the user that wpcom account information is being retrieved."))

authenticationDelegate.sync(credentials: credentials) { [weak self] _ in
authenticationDelegate.sync(credentials: credentials) { [weak self] in

self?.configureStatusLabel("")
self?.configureViewLoading(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private extension SignupGoogleViewController {

/// Existing Account: We'll synchronize all the things before proceeding to the next screen.
///
self?.authenticationDelegate.sync(credentials: credentials) { _ in
self?.authenticationDelegate.sync(credentials: credentials) {
SVProgressHUD.dismiss()
self?.wasLoggedInInstead(with: credentials)
}
Expand Down

0 comments on commit f04d9bf

Please sign in to comment.