Skip to content

Commit

Permalink
Only convert to wp-admin when the URL cannot be handled
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdchr committed Feb 24, 2023
1 parent 8acd7e4 commit 324b004
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions WordPress/Classes/System/WordPressAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,12 @@ extension WordPressAppDelegate {
//
// Read more: https://github.com/wordpress-mobile/WordPress-iOS/issues/19755
if MigrationAppDetection.isCounterpartAppInstalled {
// If possible, try to convert the URL to a WP Admin link and open it in Safari.
WPAdminConvertibleRouter.shared.handle(url: url)
return
// If we can handle the URL, then let the UniversalLinkRouter do it.
guard UniversalLinkRouter.shared.canHandle(url: url) else {
// Otherwise, try to convert the URL to a WP Admin link and open it in Safari.
WPAdminConvertibleRouter.shared.handle(url: url)
return
}
}

trackDeepLink(for: url) { url in
Expand Down

0 comments on commit 324b004

Please sign in to comment.