Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Add Brave Leo deep link. #22598

Merged
merged 1 commit into from
Mar 14, 2024
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 @@ -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
Loading