accompanist icon indicating copy to clipboard operation
accompanist copied to clipboard

Webview does not support loading url which is identical to the previous one.

Open TomasBlazej opened this issue 2 years ago • 2 comments

I have a case, where some highly secure banking site loads the url twice in a quick succession - do not know if it is a bug on their side or some backend trick. First load of the url shows just a blank page and only the second load shows the actual content.

I'm not able to do this with accompaninst webview as it is prevented in two places. It overrides all urls and sets content url, which should launch the update block and load the url - but not for the same url as it is not counted as state change. And then also in the update block, there is a check for url change to prevent reloading when only other parts of state changed. Both of these could probably be solved by some kind of a url-set-timestamp as part of the state, something like: image

I'd think it should be generally possible to load the same url again.

TomasBlazej avatar Jul 21 '22 11:07 TomasBlazej

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 21 '22 03:08 github-actions[bot]

I'm facing (almost) the same issue. When clicking a button in the info window of a bank page i'm getting eternal loading. However, usual WebView in this case loads a page with same url. upd: I've found some workaround (at least it works in my case): set AccompanistWebViewClient's shouldOverrideUrlLoading() return false.

Vad-mik avatar Aug 23 '22 14:08 Vad-mik

I'm hoping #1344 also will fix this issue but not confident. Once it's merged, I would love for you to test your use case please.

bentrengrove avatar Sep 19 '22 18:09 bentrengrove

@bentrengrove Now it is working ok (using v0.26.5-rc), at least in my case! Thanks!

Vad-mik avatar Oct 10 '22 16:10 Vad-mik