diff --git a/Riot/Modules/KeyVerification/Common/Loading/KeyVerificationDataLoadingViewController.swift b/Riot/Modules/KeyVerification/Common/Loading/KeyVerificationDataLoadingViewController.swift index ef6385777..876cdf3d7 100644 --- a/Riot/Modules/KeyVerification/Common/Loading/KeyVerificationDataLoadingViewController.swift +++ b/Riot/Modules/KeyVerification/Common/Loading/KeyVerificationDataLoadingViewController.swift @@ -69,8 +69,16 @@ final class KeyVerificationDataLoadingViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - // Hide back button - self.navigationItem.setHidesBackButton(true, animated: animated) + if let navigationController = self.navigationController { + if navigationController.navigationBar.isHidden == true { + self.navigationItem.hidesBackButton = true + // Show navigation bar if needed + self.navigationController?.setNavigationBarHidden(false, animated: animated) + } else { + // Hide back button + self.navigationItem.setHidesBackButton(true, animated: animated) + } + } } // MARK: - Private