Skip to content
Merged
Show file tree
Hide file tree
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 @@ -206,10 +206,6 @@ struct JetpackFullscreenOverlayGeneralViewModel: JetpackFullscreenOverlayViewMod
return RemoteConfig().phaseThreeBlogPostUrl.value
case .four:
return RemoteConfig().phaseFourBlogPostUrl.value
case .newUsers:
return RemoteConfig().phaseNewUsersBlogPostUrl.value
case .selfHosted:
return RemoteConfig().phaseSelfHostedBlogPostUrl.value
default:
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ class JetpackBrandingMenuCardCell: UITableViewCell {
containerStackView.addArrangedSubviews(stackViewSubviews)
logosAnimationView.currentProgress = 1.0
label.text = config?.description
learnMoreSuperview.isHidden = config?.learnMoreButtonURL == nil
}

private func applyStyles() {
Expand All @@ -202,15 +201,13 @@ class JetpackBrandingMenuCardCell: UITableViewCell {
// MARK: Actions

@objc private func learnMoreButtonTapped() {
guard let config = config,
let urlString = config.learnMoreButtonURL,
let url = URL(string: urlString) else {
guard let viewController else {
return
}

let webViewController = WebViewControllerFactory.controller(url: url, source: Constants.analyticsSource)
let navController = UINavigationController(rootViewController: webViewController)
viewController?.present(navController, animated: true)
JetpackFeaturesRemovalCoordinator.presentOverlayIfNeeded(in: viewController,
source: .card,
blog: viewController.blog)
presenter?.trackLinkTapped()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class JetpackBrandingMenuCardPresenter {
}

let description: String
let learnMoreButtonURL: String?
let type: CardType
}

Expand Down Expand Up @@ -44,19 +43,16 @@ class JetpackBrandingMenuCardPresenter {
switch phase {
case .three:
let description = Strings.phaseThreeDescription
let url = RemoteConfig(store: remoteConfigStore).phaseThreeBlogPostUrl.value
return .init(description: description, learnMoreButtonURL: url, type: .expanded)
return .init(description: description, type: .expanded)
case .four:
let description = Strings.phaseFourTitle
return .init(description: description, learnMoreButtonURL: nil, type: .compact)
return .init(description: description, type: .compact)
case .newUsers:
let description = Strings.newUsersPhaseDescription
let url = RemoteConfig(store: remoteConfigStore).phaseNewUsersBlogPostUrl.value
return .init(description: description, learnMoreButtonURL: url, type: .expanded)
return .init(description: description, type: .expanded)
case .selfHosted:
let description = Strings.selfHostedPhaseDescription
let url = RemoteConfig(store: remoteConfigStore).phaseSelfHostedBlogPostUrl.value
return .init(description: description, learnMoreButtonURL: url, type: .expanded)
return .init(description: description, type: .expanded)
default:
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ final class JetpackBrandingMenuCardPresenterTests: CoreDataTestCase {

// Then
XCTAssertEqual(config.description, "Stats, Reader, Notifications and other features will move to the Jetpack mobile app soon.")
XCTAssertEqual(config.learnMoreButtonURL, "example.com")
XCTAssertEqual(config.type, .expanded)
}

Expand All @@ -127,7 +126,6 @@ final class JetpackBrandingMenuCardPresenterTests: CoreDataTestCase {

// Then
XCTAssertEqual(config.description, "Switch to Jetpack")
XCTAssertNil(config.learnMoreButtonURL)
XCTAssertEqual(config.type, .compact)
}

Expand All @@ -146,7 +144,6 @@ final class JetpackBrandingMenuCardPresenterTests: CoreDataTestCase {

// Then
XCTAssertEqual(config.description, "Unlock your site’s full potential. Get Stats, Reader, Notifications and more with Jetpack.")
XCTAssertEqual(config.learnMoreButtonURL, "example.com")
XCTAssertEqual(config.type, .expanded)
}

Expand All @@ -167,7 +164,6 @@ final class JetpackBrandingMenuCardPresenterTests: CoreDataTestCase {

// Then
XCTAssertEqual(config.description, "Unlock your site’s full potential. Get Stats, Reader, Notifications and more with Jetpack.")
XCTAssertEqual(config.learnMoreButtonURL, "example.com")
XCTAssertEqual(config.type, .expanded)
}

Expand Down