From 2232a745c974b66720e771965331a33b1a7da32c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 8 Jul 2025 16:40:34 +0200 Subject: [PATCH] Remove useless Box --- .../impl/components/RoomListContentView.kt | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) 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 f59ac763ca..266a473269 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 @@ -69,35 +69,36 @@ fun RoomListContentView( contentPadding: PaddingValues, modifier: Modifier = Modifier, ) { - Box(modifier = modifier) { - when (contentState) { - is RoomListContentState.Skeleton -> { - SkeletonView( - count = contentState.count, - contentPadding = contentPadding, - ) - } - is RoomListContentState.Empty -> { - EmptyView( - state = contentState, - eventSink = eventSink, - onSetUpRecoveryClick = onSetUpRecoveryClick, - onConfirmRecoveryKeyClick = onConfirmRecoveryKeyClick, - onCreateRoomClick = onCreateRoomClick, - ) - } - is RoomListContentState.Rooms -> { - RoomsView( - state = contentState, - hideInvitesAvatars = hideInvitesAvatars, - filtersState = filtersState, - eventSink = eventSink, - onSetUpRecoveryClick = onSetUpRecoveryClick, - onConfirmRecoveryKeyClick = onConfirmRecoveryKeyClick, - onRoomClick = onRoomClick, - contentPadding = contentPadding, - ) - } + when (contentState) { + is RoomListContentState.Skeleton -> { + SkeletonView( + modifier = modifier, + count = contentState.count, + contentPadding = contentPadding, + ) + } + is RoomListContentState.Empty -> { + EmptyView( + modifier = modifier, + state = contentState, + eventSink = eventSink, + onSetUpRecoveryClick = onSetUpRecoveryClick, + onConfirmRecoveryKeyClick = onConfirmRecoveryKeyClick, + onCreateRoomClick = onCreateRoomClick, + ) + } + is RoomListContentState.Rooms -> { + RoomsView( + modifier = modifier, + state = contentState, + hideInvitesAvatars = hideInvitesAvatars, + filtersState = filtersState, + eventSink = eventSink, + onSetUpRecoveryClick = onSetUpRecoveryClick, + onConfirmRecoveryKeyClick = onConfirmRecoveryKeyClick, + onRoomClick = onRoomClick, + contentPadding = contentPadding, + ) } } }