mirror of
https://github.com/home-assistant/android
synced 2024-10-01 13:53:53 +00:00
Check protocol/port when determining reload for WebView (#4297)
- 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.
This commit is contained in:
parent
de3a3481e2
commit
5bf22b8631
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue