Skip to content

Commit 5fc8207

Browse files
committed
Set allowsUserTransition to false for privacy banner
1 parent 711a7ee commit 5fc8207

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ import WordPressUI
77
///
88
final class PrivacyBannerViewController: UIHostingController<PrivacyBanner> {
99

10-
// These are part of the `DrawerPresentable` protocol.
11-
// We define them here instead than in the existing extension that defines the protocol conformance so that we can make the stored constants.
12-
// Otherwise, since extensions don't allow for stored properties, they would have had to be computed vars.
13-
let allowsTapToDismiss = false
14-
let allowsDragToDismiss = false
15-
1610
/// Tracks the banner view intrinsic height.
1711
/// Needed to enable it's scrolling when it grows bigger than the screen.
1812
///
@@ -49,6 +43,11 @@ extension PrivacyBannerViewController: DrawerPresentable {
4943
var expandedHeight: DrawerHeight {
5044
return .contentHeight(bannerIntrinsicHeight)
5145
}
46+
47+
// We want the user to dimiss this only by completing the flow, not by tapping, dragging, or collapsing.
48+
var allowsDragToDismiss: Bool { false }
49+
var allowsTapToDismiss: Bool { false }
50+
var allowsUserTransition: Bool { false }
5251
}
5352

5453
/// Banner View for the privacy settings.

0 commit comments

Comments
 (0)