Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
SFController used instead of onboardingview controller
Browse files Browse the repository at this point in the history
  • Loading branch information
soner-yuksel committed Nov 8, 2022
1 parent 76384ea commit fed8f9e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import SwiftKeychainWrapper
import SwiftUI
import BraveVPN
import Onboarding
import SafariServices

// MARK: - Callouts

Expand Down Expand Up @@ -53,7 +54,10 @@ extension BrowserViewController {
self?.braveCore.p3aUtils.isP3AEnabled = isOn
},
linkAction: { url in
// onboardingP3ACalloutController.present(OnboardingWebViewController(url: .p3aDescription), animated: true, completion: nil)
let p3aLearnMoreController = SFSafariViewController(url: BraveUX.braveP3ALearnMoreURL, configuration: .init())
p3aLearnMoreController.modalPresentationStyle = .currentContext

onboardingP3ACalloutController.present(p3aLearnMoreController, animated: true)
},
primaryButtonAction: { [weak self] in
Preferences.Onboarding.p3aOnboardingShown.value = true
Expand Down
6 changes: 5 additions & 1 deletion Sources/Onboarding/Welcome/WelcomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import BraveShared
import Shared
import BraveCore
import BraveUI
import SafariServices

private enum WelcomeViewID: Int {
case background = 1
Expand Down Expand Up @@ -368,7 +369,10 @@ public class WelcomeViewController: UIViewController {
self?.p3aUtilities.isP3AEnabled = isOn
},
linkAction: { url in
// nextController.present(OnboardingWebViewController(url: .p3aDescription), animated: true, completion: nil)
let p3aLearnMoreController = SFSafariViewController(url: BraveUX.braveP3ALearnMoreURL, configuration: .init())
p3aLearnMoreController.modalPresentationStyle = .currentContext

nextController.present(p3aLearnMoreController, animated: true)
},

primaryButtonAction: { [weak self] in
Expand Down

0 comments on commit fed8f9e

Please sign in to comment.