fix(webui): defer loadUrl until WebView is laid out and support insets (#151)
The WebUI failed to load CSS/JS assets because the WebView was configured and loadUrl was called inside the AndroidView factory during Compose composition, which blocked the main thread and called loadUrl before the WebView had valid dimensions.
Refactor to match the KernelSU pattern:
- Create WebView and configure WebViewAssetLoader on IO dispatcher
- Build WebView fully on Main thread outside AndroidView
- Defer loadUrl until width > 0 && height > 0 via layout listener
- related:
- tiann/KernelSU#2952
- tiann/KernelSU#3083
- tiann/KernelSU#3126
- tiann/KernelSU#3190
Signed-off-by: KOWX712 <leecc0503@gmail.com>
Post #930
19.2K
FolkPatch_114255_4.3_on_main-release.apk10.4 MB
- ❤ 43
- 👍 6
- 🤔 1