Skip to content

Commit

Permalink
[DuckPlayer] 28. Open in Youtube -> Youtube App (#3290)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1204099484721401/1208192198782451/f

Description:
Opens the Youtube app if installed and "Open links in associated apps" is active
  • Loading branch information
afterxleep authored Sep 3, 2024
1 parent 933e11e commit c115dd1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions DuckDuckGo/DuckPlayer/DuckPlayerNavigationHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ extension DuckPlayerNavigationHandler: DuckNavigationHandling {
duckPlayer.settings.allowFirstVideo = true

// Attempt to open in YouTube app (if installed) or load in webView
if isSERPLink(navigationAction: navigationAction),
appSettings.allowUniversalLinks,
if appSettings.allowUniversalLinks,
isYouTubeAppInstalled,
let url = URL(string: "\(Constants.youtubeScheme)\(id)") {
UIApplication.shared.open(url)
Expand Down

0 comments on commit c115dd1

Please sign in to comment.