Proper way to fix #107 (#148)

This commit is contained in:
tarsin 2023-01-30 09:53:24 +08:00 committed by GitHub
parent a871b92dc9
commit bd6b0d3d12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,8 +82,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
icon = { Icon(Icons.Filled.Add, moduleInstall) },
text = { Text(text = moduleInstall) },
)
},
floatingActionButtonPosition = FabPosition.Center,
}
) { innerPadding ->
val failedEnable = stringResource(R.string.module_failed_to_enable)
val failedDisable = stringResource(R.string.module_failed_to_disable)
@ -123,7 +122,8 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
}
} else {
LazyColumn(
verticalArrangement = Arrangement.spacedBy(15.dp)
verticalArrangement = Arrangement.spacedBy(15.dp),
contentPadding = remember { PaddingValues(bottom = 16.dp + 56.dp /* Scaffold Fab Spacing + Fab container height */ ) }
) {
items(viewModel.moduleList) { module ->
var isChecked by rememberSaveable(module) { mutableStateOf(module.enabled) }