This fixes the bottom content not pushed up when keyboard is visible.

This commit is contained in:
Wolf-Martell Montwé 2023-06-07 15:57:07 +02:00
parent d547e845d2
commit e6c2668582
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72
2 changed files with 15 additions and 9 deletions

View file

@ -1,7 +1,7 @@
package app.k9mail.feature.preview.ui
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.compose.rememberNavController
@ -19,7 +19,7 @@ fun FeatureApp(
Background(
modifier = Modifier
.fillMaxSize()
.systemBarsPadding()
.safeDrawingPadding()
.then(modifier),
) {
FeatureNavHost(navController = navController)

View file

@ -1,9 +1,11 @@
package app.k9mail.ui.catalog.ui
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import app.k9mail.core.ui.compose.common.mvi.observe
import app.k9mail.core.ui.compose.designsystem.atom.Background
import app.k9mail.ui.catalog.ui.CatalogContract.Event.OnThemeChanged
import app.k9mail.ui.catalog.ui.CatalogContract.Event.OnThemeVariantChanged
import app.k9mail.ui.catalog.ui.CatalogContract.ViewModel
@ -21,13 +23,17 @@ fun CatalogScreen(
theme = state.value.theme,
themeVariant = state.value.themeVariant,
) {
CatalogContent(
state = state.value,
onThemeChanged = { dispatch(OnThemeChanged) },
onThemeVariantChanged = { dispatch(OnThemeVariantChanged) },
Background(
modifier = Modifier
.systemBarsPadding()
.fillMaxSize()
.safeDrawingPadding()
.then(modifier),
)
) {
CatalogContent(
state = state.value,
onThemeChanged = { dispatch(OnThemeChanged) },
onThemeVariantChanged = { dispatch(OnThemeVariantChanged) },
)
}
}
}