diff --git a/Signal/src/ViewControllers/Registration/Onboarding/OnboardingProfileCreationViewController.swift b/Signal/src/ViewControllers/Registration/Onboarding/OnboardingProfileCreationViewController.swift index 12454b1d51..433500d93c 100644 --- a/Signal/src/ViewControllers/Registration/Onboarding/OnboardingProfileCreationViewController.swift +++ b/Signal/src/ViewControllers/Registration/Onboarding/OnboardingProfileCreationViewController.swift @@ -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) + } } } }