From 7cad1f2d767bc104b54806cdfbcb5e69ba3b40df Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 8 Jul 2025 17:29:45 +0200 Subject: [PATCH] Ensure that EmptyView has the padding too, especially when there is a banner to display. Add preview with empty list and banner. --- .../features/home/impl/components/RoomListContentView.kt | 2 +- .../features/home/impl/roomlist/RoomListStateProvider.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/RoomListContentView.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/RoomListContentView.kt index 266a473269..2845a79b8e 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/RoomListContentView.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/RoomListContentView.kt @@ -79,7 +79,7 @@ fun RoomListContentView( } is RoomListContentState.Empty -> { EmptyView( - modifier = modifier, + modifier = modifier.padding(contentPadding), state = contentState, eventSink = eventSink, onSetUpRecoveryClick = onSetUpRecoveryClick, diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/roomlist/RoomListStateProvider.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/roomlist/RoomListStateProvider.kt index 0e4600c16a..b28ff0cce9 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/roomlist/RoomListStateProvider.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/roomlist/RoomListStateProvider.kt @@ -42,6 +42,7 @@ open class RoomListStateProvider : PreviewParameterProvider { aRoomListState(searchState = aRoomListSearchState(isSearchActive = true, query = "Test")), aRoomListState(contentState = aRoomsContentState(securityBannerState = SecurityBannerState.SetUpRecovery)), aRoomListState(contentState = aRoomsContentState(batteryOptimizationState = aBatteryOptimizationState(shouldDisplayBanner = true))), + aRoomListState(contentState = anEmptyContentState(securityBannerState = SecurityBannerState.RecoveryKeyConfirmation)), ) }