mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 12:54:35 +00:00
Improve MediaViewerBottomBar usage.
This commit is contained in:
committed by
Benoit Marty
parent
562e36b5ea
commit
8188ef1463
+5
-5
@@ -233,12 +233,13 @@ fun MediaViewerView(
|
|||||||
isUserSelected = (state.listData[page] as? MediaViewerPageData.MediaViewerData)?.eventId == state.initiallySelectedEventId,
|
isUserSelected = (state.listData[page] as? MediaViewerPageData.MediaViewerData)?.eventId == state.initiallySelectedEventId,
|
||||||
)
|
)
|
||||||
// Bottom bar
|
// Bottom bar
|
||||||
AnimatedVisibility(visible = showOverlay, enter = fadeIn(), exit = fadeOut()) {
|
AnimatedVisibility(
|
||||||
Box(
|
visible = showOverlay,
|
||||||
modifier = Modifier.fillMaxSize()
|
enter = fadeIn(),
|
||||||
|
exit = fadeOut(),
|
||||||
|
modifier = Modifier.align(Alignment.BottomCenter),
|
||||||
) {
|
) {
|
||||||
MediaViewerBottomBar(
|
MediaViewerBottomBar(
|
||||||
modifier = Modifier.align(Alignment.BottomCenter),
|
|
||||||
showDivider = dataForPage.mediaInfo.mimeType.isMimeTypeVideo(),
|
showDivider = dataForPage.mediaInfo.mimeType.isMimeTypeVideo(),
|
||||||
caption = dataForPage.mediaInfo.caption,
|
caption = dataForPage.mediaInfo.caption,
|
||||||
onHeightChange = { bottomPaddingInPixels = it },
|
onHeightChange = { bottomPaddingInPixels = it },
|
||||||
@@ -249,7 +250,6 @@ fun MediaViewerView(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
when (val bottomSheetState = state.mediaBottomSheetState) {
|
when (val bottomSheetState = state.mediaBottomSheetState) {
|
||||||
MediaBottomSheetState.Hidden -> Unit
|
MediaBottomSheetState.Hidden -> Unit
|
||||||
|
|||||||
Reference in New Issue
Block a user