Skip to content

Commit

Permalink
Fix email deeplink (#2061)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/414709148257752/1205632787359637/f

Description:
Fix deeplink issue with email protection.
  • Loading branch information
Bunn authored and jaceklyp committed Oct 2, 2023
1 parent 281d7ef commit 1d8ca51
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions DuckDuckGo/AppDelegate+AppDeepLinks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ extension AppDelegate {
mainViewController.newTab(reuseExisting: true, allowingKeyboard: false)

case .quickLink:
handleQuickLink(url, mainViewController)
let query = AppDeepLinkSchemes.query(fromQuickLink: url)
mainViewController.loadQueryInNewTab(query, reuseExisting: true)

case .addFavorite:
mainViewController.startAddFavoriteFlow()
Expand Down Expand Up @@ -64,14 +65,4 @@ extension AppDelegate {

return true
}

private func handleQuickLink(_ url: URL, _ mainViewController: MainViewController) {
let query = AppDeepLinkSchemes.query(fromQuickLink: url)
if let url = URL(string: query) {
mainViewController.loadUrlInNewTab(url, reuseExisting: true, inheritedAttribution: nil)
} else {
mainViewController.loadQueryInNewTab(query, reuseExisting: true)
}
}

}

0 comments on commit 1d8ca51

Please sign in to comment.