Opens image dialog in the page of the current selection.

pull/380/head
Vitor Pamplona 2023-04-25 18:11:08 -04:00
rodzic e958515dad
commit f38f5737b0
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -248,6 +248,13 @@ fun ZoomableImageDialog(imageUrl: ZoomableContent, allImages: List<ZoomableConte
Column() {
val pagerState: PagerState = remember { PagerState() }
LaunchedEffect(key1 = pagerState, key2 = imageUrl) {
val page = allImages.indexOf(imageUrl)
if (page > -1) {
pagerState.scrollToPage(page)
}
}
Row(
modifier = Modifier
.padding(10.dp)