From 81d172e7a2465e48444867fde97b7aeffb76d7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eyl=C3=BCl=20Naz=20Can?= Date: Sun, 22 Dec 2024 22:25:15 +0100 Subject: [PATCH] change bottom sheet state to full and add padding to code of conduct --- .../feature/metis/codeofconduct/ui/AcceptCodeOfConductUi.kt | 2 +- .../ui/conversation/overview/ConversationOverviewBody.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/feature/metis/code-of-conduct/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/codeofconduct/ui/AcceptCodeOfConductUi.kt b/feature/metis/code-of-conduct/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/codeofconduct/ui/AcceptCodeOfConductUi.kt index 39a57b9a9..2cddbc713 100644 --- a/feature/metis/code-of-conduct/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/codeofconduct/ui/AcceptCodeOfConductUi.kt +++ b/feature/metis/code-of-conduct/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/codeofconduct/ui/AcceptCodeOfConductUi.kt @@ -91,7 +91,7 @@ fun AcceptCodeOfConductUi( horizontalAlignment = Alignment.CenterHorizontally ) { CodeOfConductUi( - modifier = Modifier.fillMaxSize(), + modifier = Modifier.fillMaxSize().padding(top = 8.dp), codeOfConductText = codeOfConductText, responsibleUsers = responsibleUsers ) diff --git a/feature/metis/manage-conversations/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/manageconversations/ui/conversation/overview/ConversationOverviewBody.kt b/feature/metis/manage-conversations/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/manageconversations/ui/conversation/overview/ConversationOverviewBody.kt index 0b7c2c300..18a6a6992 100644 --- a/feature/metis/manage-conversations/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/manageconversations/ui/conversation/overview/ConversationOverviewBody.kt +++ b/feature/metis/manage-conversations/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/manageconversations/ui/conversation/overview/ConversationOverviewBody.kt @@ -35,6 +35,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.Text import androidx.compose.material3.TextButton +import androidx.compose.material3.rememberModalBottomSheetState import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState @@ -188,7 +189,8 @@ fun ConversationOverviewBody( if (showCodeOfConduct) { ModalBottomSheet( contentWindowInsets = { WindowInsets.statusBars }, - onDismissRequest = { showCodeOfConduct = false } + onDismissRequest = { showCodeOfConduct = false }, + sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true), ) { CodeOfConductUi( modifier = Modifier