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

View File

@@ -82,8 +82,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
icon = { Icon(Icons.Filled.Add, moduleInstall) }, icon = { Icon(Icons.Filled.Add, moduleInstall) },
text = { Text(text = moduleInstall) }, text = { Text(text = moduleInstall) },
) )
}, }
floatingActionButtonPosition = FabPosition.Center,
) { innerPadding -> ) { innerPadding ->
val failedEnable = stringResource(R.string.module_failed_to_enable) val failedEnable = stringResource(R.string.module_failed_to_enable)
val failedDisable = stringResource(R.string.module_failed_to_disable) val failedDisable = stringResource(R.string.module_failed_to_disable)
@@ -123,7 +122,8 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
} }
} else { } else {
LazyColumn( 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 -> items(viewModel.moduleList) { module ->
var isChecked by rememberSaveable(module) { mutableStateOf(module.enabled) } var isChecked by rememberSaveable(module) { mutableStateOf(module.enabled) }