Skip to content

Commit 5981b84

Browse files
committed
Use a hack to prevent privacy banner to be dismissed
1 parent 1d4d76a commit 5981b84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Settings/Privacy/PrivacyBannerPresenter.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,15 @@ extension PrivacyBannerPresenter {
9292
static let retry = NSLocalizedString("Retry", comment: "Retry title on the notice action button")
9393
}
9494
}
95+
96+
extension BottomSheetViewController {
97+
/// Temporary hack to prevent the `PrivacyBannerViewController` to be dismissed.
98+
/// This should be changed once is merged.
99+
///
100+
public override func dismiss(animated flag: Bool, completion: (() -> Void)? = nil) {
101+
if children.first is PrivacyBannerViewController {
102+
return
103+
}
104+
super.dismiss(animated: flag, completion: completion)
105+
}
106+
}

0 commit comments

Comments
 (0)