diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Privacy/PrivacyBannerPresenter.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Privacy/PrivacyBannerPresenter.swift index f2188502bd9..d69c06cd876 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Privacy/PrivacyBannerPresenter.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Privacy/PrivacyBannerPresenter.swift @@ -62,6 +62,7 @@ final class PrivacyBannerPresenter { }) let bottomSheetViewController = BottomSheetViewController(childViewController: privacyBanner) + bottomSheetViewController.isModalInPresentation = true bottomSheetViewController.show(from: viewController) } @@ -92,3 +93,15 @@ extension PrivacyBannerPresenter { static let retry = NSLocalizedString("Retry", comment: "Retry title on the notice action button") } } + +extension BottomSheetViewController { + /// Temporary hack to prevent the `PrivacyBannerViewController` to be dismissed. + /// This should be changed once https://github.com/wordpress-mobile/WordPressUI-iOS/pull/126 is merged. + /// + public override func dismiss(animated flag: Bool, completion: (() -> Void)? = nil) { + if children.first is PrivacyBannerViewController { + return + } + super.dismiss(animated: flag, completion: completion) + } +}