google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.38k stars 596 forks source link

[WebView] UI takes time for max size to settle down #1639

Closed Doomsdayrs closed 1 year ago

Doomsdayrs commented 1 year ago

Description

WebView loading does not finish on the first Finished, but a few a few state changes later. As the size of the WebView inflates massively then drops down.

This means additional code must be used to try and wait for the WebView to settle down before performing scrolls.

Steps to reproduce

  1. Setup webview in code.
  2. Setup a custom ScrollState onto webview.
  3. Setup a custom WebViewState onto webview.
  4. Setup a LaunchedEffect watching ScrollState.maxValue and WebViewState.loadingState and print out the values.
  5. Notice the following logs.

image

Delay Count and the a / b are tests for additional code to await the web view settling down.

Expected behavior

WebViewState.loadingState is Finished only after the view settles down.

Additional context

https://gitlab.com/shosetsuorg/shosetsu/-/blob/development/android/src/main/java/app/shosetsu/android/ui/reader/page/HTMLPage.kt

github-actions[bot] commented 1 year ago

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] commented 1 year ago

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.

bentrengrove commented 1 year ago

Unfortunately Accompanist WebView has been deprecated and won't be supported going forwards. I am closing this issue. We recommend you fork the implemenation here and customise it to your needs. For more information please see our update blog