Skip to content

Commit

Permalink
[iOS] Add Brave Leo deep link. (uplift to 1.65.x) (#22603)
Browse files Browse the repository at this point in the history
Uplift of #22598 (squashed) to beta
  • Loading branch information
brave-builds authored Mar 15, 2024
1 parent 7cc93b3 commit 2a69065
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,14 @@ extension BrowserViewController {
}
}
}

func presentBraveLeoDeepLink() {
// If the onboarding has not completed we do not show any promo screens.
// This will most likely be the case for users who have not installed the app yet.
if Preferences.Onboarding.basicOnboardingCompleted.value != OnboardingState.completed.rawValue {
return
}

openBraveLeo()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Shared
// To open a URL use /open-url or to open a blank tab use /open-url with no params
public enum DeepLink: String {
case vpnCrossPlatformPromo = "vpn_promo"
case braveLeo = "brave_leo"
}

// The root navigation for the Router. Look at the tests to see a complete URL
Expand Down Expand Up @@ -86,6 +87,8 @@ public enum NavigationPath: Equatable {
switch link {
case .vpnCrossPlatformPromo:
bvc.presentVPNInAppEventCallout()
case .braveLeo:
bvc.presentBraveLeoDeepLink()
}
}

Expand Down

0 comments on commit 2a69065

Please sign in to comment.