Updates URLPreview in the main thread.

This commit is contained in:
Vitor Pamplona
2023-06-28 11:09:54 -04:00
parent 0916a97526
commit c652390a9c
@@ -25,7 +25,9 @@ fun UrlPreview(url: String, urlText: String) {
LaunchedEffect(url) {
launch(Dispatchers.IO) {
UrlCachedPreviewer.previewInfo(url) {
urlPreviewState = it
launch(Dispatchers.Main) {
urlPreviewState = it
}
}
}
}