Fix broken preview of BottomSheet in Android Studio.

This commit is contained in:
Benoit Marty
2026-06-19 14:04:46 +02:00
parent e98cbdfce1
commit 123037a612
11 changed files with 29 additions and 16 deletions
@@ -153,10 +153,11 @@ private fun AttachmentSourcePickerMenu(
@PreviewsDayNight
@Composable
internal fun AttachmentSourcePickerMenuPreview() = ElementPreview {
AttachmentSourcePickerMenu(
internal fun AttachmentSourcePickerMenuPreview() = ElementPreview(fillMaxSize = true) {
AttachmentsBottomSheet(
state = aMessageComposerState(
canShareLocation = true,
showAttachmentSourcePicker = true,
),
onSendLocationClick = {},
onCreatePollClick = {},
@@ -9,7 +9,6 @@
package io.element.android.features.messages.impl.timeline.components.receipt.bottomsheet
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.lazy.LazyColumn
@@ -118,9 +117,9 @@ private fun ReadReceiptBottomSheetContent(
@PreviewsDayNight
@Composable
internal fun ReadReceiptBottomSheetPreview(@PreviewParameter(ReadReceiptBottomSheetStateProvider::class) state: ReadReceiptBottomSheetState) = ElementPreview {
Column {
ReadReceiptBottomSheetContent(
internal fun ReadReceiptBottomSheetPreview(@PreviewParameter(ReadReceiptBottomSheetStateProvider::class) state: ReadReceiptBottomSheetState) {
ElementPreview(fillMaxSize = true) {
ReadReceiptBottomSheet(
state = state,
onUserDataClick = {},
)