manager: Add key to LazyColumn's items to prevent incorrect allow sta… (#255)

This commit is contained in:
TinyHai
2023-02-20 10:31:58 +08:00
committed by GitHub
parent a2906093ec
commit ebf6a52237

View File

@@ -100,7 +100,7 @@ fun SuperUserScreen() {
.fillMaxSize()
) {
LazyColumn {
items(viewModel.appList) { app ->
items(viewModel.appList, key = { it.packageName }) { app ->
var isChecked by rememberSaveable(app) { mutableStateOf(app.onAllowList) }
AppItem(app, isChecked) { checked ->
val success = Natives.allowRoot(app.uid, checked)