manager: manager: disable user scroll when refreshing

This commit is contained in:
tiann
2023-04-19 18:14:09 +08:00
parent 70fa38a589
commit d86b524558
2 changed files with 2 additions and 1 deletions

View File

@@ -191,6 +191,7 @@ private fun ModuleList(viewModel: ModuleViewModel, modifier: Modifier = Modifier
+ 16.dp + 56.dp /* Scaffold Fab Spacing + Fab container height */ + 16.dp + 56.dp /* Scaffold Fab Spacing + Fab container height */
) )
}, },
userScrollEnabled = !viewModel.isRefreshing
) { ) {
val isEmpty = viewModel.moduleList.isEmpty() val isEmpty = viewModel.moduleList.isEmpty()
if (isEmpty) { if (isEmpty) {

View File

@@ -107,7 +107,7 @@ fun SuperUserScreen() {
) { ) {
val failMessage = stringResource(R.string.superuser_failed_to_grant_root) val failMessage = stringResource(R.string.superuser_failed_to_grant_root)
LazyColumn(Modifier.fillMaxSize()) { LazyColumn(Modifier.fillMaxSize(), userScrollEnabled = !viewModel.isRefreshing) {
items(viewModel.appList, key = { it.packageName + it.uid }) { app -> items(viewModel.appList, key = { it.packageName + it.uid }) { app ->
var isChecked by rememberSaveable(app) { mutableStateOf(app.onAllowList) } var isChecked by rememberSaveable(app) { mutableStateOf(app.onAllowList) }
val dialogHost = LocalDialogHost.current val dialogHost = LocalDialogHost.current