Leverage spinner error UI
This commit is contained in:
parent
29dc1eefcd
commit
f2bb180d65
@ -352,15 +352,19 @@ public class OnboardingProfileCreationViewController: OnboardingBaseViewControll
|
||||
} completion: { _ in
|
||||
spinner.removeFromSuperview()
|
||||
}
|
||||
}.recover { error in
|
||||
if error.isNetworkConnectivityFailure {
|
||||
OWSActionSheets.showErrorAlert(
|
||||
message: NSLocalizedString(
|
||||
"PROFILE_VIEW_NO_CONNECTION",
|
||||
comment: "Error shown when the user tries to update their profile when the app is not connected to the internet.")
|
||||
)
|
||||
} else {
|
||||
OWSActionSheets.showErrorAlert(message: error.userErrorDescription)
|
||||
}.catch { error in
|
||||
spinner.stopAnimating(success: false) {
|
||||
spinner.removeFromSuperview()
|
||||
|
||||
if error.isNetworkConnectivityFailure {
|
||||
OWSActionSheets.showErrorAlert(
|
||||
message: NSLocalizedString(
|
||||
"PROFILE_VIEW_NO_CONNECTION",
|
||||
comment: "Error shown when the user tries to update their profile when the app is not connected to the internet.")
|
||||
)
|
||||
} else {
|
||||
OWSActionSheets.showErrorAlert(message: error.userErrorDescription)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user