From 760e35e927cd5c94fccf54e68504af4bcf1ff634 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Thu, 7 Nov 2024 13:38:25 +0100 Subject: [PATCH] Make empty states scrollable if there's not enough space --- .../infomaniak/swisstransfer/ui/components/EmptyState.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/EmptyState.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/EmptyState.kt index 41a7c92d7f..f439726308 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/EmptyState.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/EmptyState.kt @@ -22,6 +22,8 @@ import androidx.annotation.StringRes import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.verticalScroll import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -51,7 +53,9 @@ fun EmptyState( modifier: Modifier = Modifier, ) { Box( - modifier = Modifier.fillMaxSize(), + modifier = Modifier + .fillMaxSize() + .verticalScroll(rememberScrollState()), contentAlignment = Alignment.Center, ) { IllustratedMessageBlock(