Skip to content

Commit 12d99fa

Browse files
authored
Make privacy banner not dismissable via WordPress UI tooling (#9830)
2 parents c968da6 + 88ed395 commit 12d99fa

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ target 'WooCommerce' do
9090

9191
wordpress_shared
9292

93-
pod 'WordPressUI', '~> 1.12.5'
93+
pod 'WordPressUI', '~> 1.13-beta'
9494
# pod 'WordPressUI', :git => 'https://github.com/wordpress-mobile/WordPressUI-iOS.git', :branch => ''
9595

9696
aztec

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ PODS:
5454
- WordPressShared (~> 2.0-beta)
5555
- wpxmlrpc (~> 0.10)
5656
- WordPressShared (2.1.0)
57-
- WordPressUI (1.12.5)
57+
- WordPressUI (1.13.0)
5858
- Wormholy (1.6.6)
5959
- WPMediaPicker (1.8.1)
6060
- wpxmlrpc (0.10.0)
@@ -85,7 +85,7 @@ DEPENDENCIES:
8585
- WordPress-Editor-iOS (~> 1.11.0)
8686
- WordPressAuthenticator (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, branch `trunk`)
8787
- WordPressShared (~> 2.1)
88-
- WordPressUI (~> 1.12.5)
88+
- WordPressUI (~> 1.13-beta)
8989
- Wormholy (~> 1.6.6)
9090
- WPMediaPicker (~> 1.8.1)
9191
- ZendeskSupportSDK (~> 6.0)
@@ -161,7 +161,7 @@ SPEC CHECKSUMS:
161161
WordPressAuthenticator: 8a27a3c61ca0d740df66f260902aa2ca8528c61b
162162
WordPressKit: b65a51863982d8166897bea8b753f1fc51732aad
163163
WordPressShared: 0aa459e5257a77184db87805a998f447443c9706
164-
WordPressUI: c5be816f6c7b3392224ac21de9e521e89fa108ac
164+
WordPressUI: 9951bdade87c8c64b50535aaed2a53a11d0c52ee
165165
Wormholy: 09da0b876f9276031fd47383627cb75e194fc068
166166
WPMediaPicker: 9011a0ec1f468c039af7485c244576b4c9889a0f
167167
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd
@@ -173,6 +173,6 @@ SPEC CHECKSUMS:
173173
ZendeskSupportProvidersSDK: 685b5d185af47ced0ec40564ec46355c838bbd06
174174
ZendeskSupportSDK: 92e6f9d334e81e9186f8a17583862350460a5393
175175

176-
PODFILE CHECKSUM: 7ef16ee777d45b27a6ea41073fce0a707bda17a7
176+
PODFILE CHECKSUM: 08c354d1c2b7fcbef3508c1931f343661f463f8e
177177

178178
COCOAPODS: 1.11.3

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,3 @@ extension PrivacyBannerPresenter {
100100
static let retry = NSLocalizedString("Retry", comment: "Retry title on the notice action button")
101101
}
102102
}
103-
104-
extension BottomSheetViewController {
105-
/// Temporary hack to prevent the `PrivacyBannerViewController` to be dismissed.
106-
/// This should be changed once https://github.com/wordpress-mobile/WordPressUI-iOS/pull/126 is merged.
107-
///
108-
public override func dismiss(animated flag: Bool, completion: (() -> Void)? = nil) {
109-
if children.first is PrivacyBannerViewController {
110-
return
111-
}
112-
super.dismiss(animated: flag, completion: completion)
113-
}
114-
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ extension PrivacyBannerViewController: DrawerPresentable {
4343
var expandedHeight: DrawerHeight {
4444
return .contentHeight(bannerIntrinsicHeight)
4545
}
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 }
4651
}
4752

4853
/// Banner View for the privacy settings.

0 commit comments

Comments
 (0)