Closed 4brunu closed 1 year ago
Hi, I found some inconsistency with the current webview loading state implementation.
Sometimes the loadingState ends with Finished, sometimes it ends with Loading(1.0f). So the isLoading var doesn't work reliably.
Here are a few examples that are reproduced with the sample project.
Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Initializing Loading(progress=0.0) Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Loading(progress=1.0) Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Loading(progress=1.0) Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Loading(progress=1.0) Initializing Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Loading(progress=1.0) Initializing Loading(progress=0.1) Loading(progress=0.0) Loading(progress=1.0) Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Initializing Loading(progress=0.1) Loading(progress=0.0) Finished Initializing Loading(progress=0.0) Finished
To try to fix this, when the loading value is 100% it changes directly to finished.
@4brunu Why did you close this pr?
I'm not sure if this is the right way to fix this issue, and if this solves all the edge cases, so I opened the following issue https://github.com/google/accompanist/issues/1607.
Hi, I found some inconsistency with the current webview loading state implementation.
Sometimes the loadingState ends with Finished, sometimes it ends with Loading(1.0f). So the isLoading var doesn't work reliably.
Here are a few examples that are reproduced with the sample project.
To try to fix this, when the loading value is 100% it changes directly to finished.
Please add the library name to the PR title. Example: "[Insets] Fixes typo"