Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ final class PrivacyBannerPresenter {
})

let bottomSheetViewController = BottomSheetViewController(childViewController: privacyBanner)
bottomSheetViewController.isModalInPresentation = true
bottomSheetViewController.show(from: viewController)
}

Expand Down Expand Up @@ -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)
}
}