Skip to content

Commit

Permalink
Check protocol/port when determining reload for WebView (#4297)
Browse files Browse the repository at this point in the history
- When determining whether the WebView should be reloaded with the current server URL, also check that the protocol (http/https) and port (8123, 443, ...) match and if not reload.
  • Loading branch information
jpelgrom committed Mar 26, 2024
1 parent de3a348 commit 5bf22b8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ class WebViewPresenterImpl @Inject constructor(
loosing wifi signal and reopening app. Without this we would still be trying to use the
internal url externally.
*/
if (oldUrlForServer != urlForServer || oldUrl?.host != url?.host) {
if (
oldUrlForServer != urlForServer ||
oldUrl?.protocol != url?.protocol ||
oldUrl?.host != url?.host ||
oldUrl?.port != url?.port
) {
view.loadUrl(
url = Uri.parse(url.toString())
.buildUpon()
Expand Down

0 comments on commit 5bf22b8

Please sign in to comment.