Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 5dfecbf

Browse files
authored
Merge pull request #536 from wordpress-mobile/issue/535-terms-of-service
Allow host apps to remove the link to the WP.com Terms Of Service
2 parents 0170c88 + 571f7fe commit 5dfecbf

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

WordPressAuthenticator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPressAuthenticator"
3-
s.version = "1.31.0-beta.3"
3+
s.version = "1.31.0-beta.4"
44
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
55

66
s.description = <<-DESC

WordPressAuthenticator/Authenticator/WordPressAuthenticatorDelegateProtocol.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public protocol WordPressAuthenticatorDelegate: class {
1212
///
1313
var supportActionEnabled: Bool { get }
1414

15+
/// Indicates if the WordPress.com's Terms of Service should be enabled, or not.
16+
///
17+
var wpcomTermsOfServiceEnabled: Bool { get }
18+
1519
/// Indicates if the Support notification indicator should be displayed.
1620
///
1721
var showSupportNotificationIndicator: Bool { get }

WordPressAuthenticator/Unified Auth/View Related/Get Started/GetStartedViewController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@ private extension GetStartedViewController {
206206
/// Describes how the tableView rows should be rendered.
207207
///
208208
func loadRows() {
209-
rows = [.instructions, .email, .tos]
209+
rows = [.instructions, .email]
210+
211+
if let authenticationDelegate = WordPressAuthenticator.shared.delegate, authenticationDelegate.wpcomTermsOfServiceEnabled {
212+
rows.append(.tos)
213+
}
210214

211215
if let errorText = errorMessage, !errorText.isEmpty {
212216
rows.append(.errorMessage)

0 commit comments

Comments
 (0)