From 670a20c37f1f75a2a31e91f45d04b20d8afcc28d Mon Sep 17 00:00:00 2001 From: weishu Date: Sun, 4 Jun 2023 23:24:19 +0800 Subject: [PATCH] manager: Fix selection --- .../kernelsu/ui/component/profile/RootProfileConfig.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt b/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt index d79201ef..8a51c11e 100644 --- a/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt +++ b/manager/app/src/main/java/me/weishu/kernelsu/ui/component/profile/RootProfileConfig.kt @@ -194,18 +194,16 @@ fun GroupsPanel(selected: List, closeSelection: (selection: List ) } - val selection = mutableListOf() + val selection = ArrayList(selected) ListDialog( state = rememberUseCaseState(visible = true, onFinishedRequest = { - Log.i("mylog", "onFinishedRequest") closeSelection(selection) }, onCloseRequest = { showDialog = false - Log.i("mylog", "onCloseRequest") }), selection = ListSelection.Multiple( showCheckBoxes = true, - options = options + options = options, ) { indecies, _ -> // Handle selection indecies.forEach { index -> @@ -256,7 +254,7 @@ fun CapsPanel( ) } - val selection = mutableListOf() + val selection = ArrayList(selected) ListDialog( state = rememberUseCaseState(visible = true, onFinishedRequest = { closeSelection(selection)