Skip to content

Commit

Permalink
fixed : selection apps with user
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSluffy committed Feb 18, 2025
1 parent 964d86e commit 93827c6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ fun SelectAppsForDrawerFolder(
Checkbox(
checked = selectedAppsInFolder.any {
val appInfo = it as? AppInfo
appInfo?.targetPackage == app.key.componentName.packageName
appInfo?.targetPackage == app.key.componentName.packageName && appInfo.user == app.key.user
},
onCheckedChange = null,
)
Expand Down Expand Up @@ -266,9 +266,9 @@ fun updateFolderItems(
onSetChange: (Set<ItemInfo>) -> Unit,
) {
val newSet = items.toMutableSet().apply {
val isChecked = any { it is AppInfo && it.targetPackage == app.key.componentName.packageName }
val isChecked = any { it is AppInfo && it.targetPackage == app.key.componentName.packageName && it.user == app.key.user }
if (isChecked) {
removeIf { it is AppInfo && it.targetPackage == app.key.componentName.packageName }
removeIf { it is AppInfo && it.targetPackage == app.key.componentName.packageName && it.user == app.key.user }
} else {
add(
app.toAppInfo(context),
Expand Down

0 comments on commit 93827c6

Please sign in to comment.