nit: allow deselect model on Model Selection screen

This commit is contained in:
Han Yin 2025-04-20 17:27:34 -07:00
parent 6b74c49e6b
commit ec47fa3d14
1 changed files with 3 additions and 0 deletions

View File

@ -68,6 +68,9 @@ fun ModelSelectionScreen(
ModelCardExpandable( ModelCardExpandable(
model = model, model = model,
isSelected = if (model == preselectedModel) true else null, isSelected = if (model == preselectedModel) true else null,
onSelected = { selected ->
if (!selected) viewModel.resetSelection()
},
isExpanded = model == preselectedModel, isExpanded = model == preselectedModel,
onExpanded = { expanded -> onExpanded = { expanded ->
viewModel.preselectModel(model, expanded) viewModel.preselectModel(model, expanded)