Skip to content

Commit

Permalink
Correctly load intercepted URLs (#5107)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1207252092703676/1208500665899984/f

### Description

### Steps to test this PR

_Feature 1_
- [x] Set Duck Player settings to Always enabled
- [x] Open
https://clicks.aweber.com/y/ct/?l=pbFxrn&m=gzpbMhiix7McQMQ&b=cIoUrwlB2qpdga9S7Y8fWQ
- [x] Check Duck Player is launched
- [x] Navigate back
- [x] Check you're taken to the previous page (or the customtab is
closed if the navigation was initiated from an external link)

### UI changes
| Before  | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|
  • Loading branch information
CrisBarreiro authored Oct 10, 2024
1 parent dd283b8 commit c2514bc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ class BrowserWebViewClient @Inject constructor(
This forces shouldInterceptRequest to be called with the YouTube URL, otherwise that method is never executed and
therefore the Duck Player page is never launched if YouTube comes from a redirect.
*/
webView.loadUrl(url.toString())
webViewClientListener?.let {
loadUrl(it, webView, url.toString())
}
return true
} else {
shouldOverrideWebRequest(url, webView, isForMainFrame)
Expand Down

0 comments on commit c2514bc

Please sign in to comment.