manager: Add default groups when empty
This commit is contained in:
@@ -164,9 +164,11 @@ fun RootProfileConfig(
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
val selectedGroups = profile.groups.mapNotNull { id ->
|
val selectedGroups = profile.groups.ifEmpty { listOf(0) }.let {
|
||||||
|
it.mapNotNull { id ->
|
||||||
Groups.values().find { it.gid == id }
|
Groups.values().find { it.gid == id }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
GroupsPanel(selectedGroups) {
|
GroupsPanel(selectedGroups) {
|
||||||
onProfileChange(
|
onProfileChange(
|
||||||
profile.copy(
|
profile.copy(
|
||||||
|
|||||||
Reference in New Issue
Block a user