fix: Modal bottom sheet no longer has additional padding

This commit is contained in:
Artem Chepurnoy 2024-07-05 11:23:36 +03:00
parent 035199d74c
commit 0ca1a1c15e
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E
1 changed files with 1 additions and 9 deletions

View File

@ -2,11 +2,6 @@ package com.artemchep.keyguard.ui
import android.content.res.Configuration
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.systemBars
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
@ -38,14 +33,11 @@ actual fun LeMOdelBottomSheet(
skipPartiallyExpanded = false,
)
if (visible) {
val contentInsets = WindowInsets.systemBars
.only(WindowInsetsSides.Bottom)
val contentPadding = contentInsets
.asPaddingValues()
ModalBottomSheet(
onDismissRequest = onDismissRequest,
sheetState = bottomSheetState,
content = {
val contentPadding = PaddingValues(0.dp)
content(contentPadding)
},
)