Skip to content

Commit

Permalink
[iOS] Add Brave Leo deep link. (uplift to 1.64.x) (#22604)
Browse files Browse the repository at this point in the history
Uplift of #22598 (squashed) to release
  • Loading branch information
brave-builds authored Mar 15, 2024
1 parent c476cac commit 6251370
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 @@ -336,4 +336,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 BraveWidgetsModels
// 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 @@ -80,6 +81,8 @@ public enum NavigationPath: Equatable {
switch link {
case .vpnCrossPlatformPromo:
bvc.presentVPNInAppEventCallout()
case .braveLeo:
bvc.presentBraveLeoDeepLink()
}
}

Expand Down

0 comments on commit 6251370

Please sign in to comment.