Skip to content

Commit

Permalink
[iOS] Add Brave Leo deep link. (#22598)
Browse files Browse the repository at this point in the history
  • Loading branch information
iccub authored Mar 14, 2024
1 parent 738dead commit 4b7d5c1
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 4b7d5c1

Please sign in to comment.