Hide keyboard after switching profile

Close #1755
This commit is contained in:
MM20
2026-01-09 13:46:07 +01:00
parent ae38bfd18c
commit 86867ead37
2 changed files with 5 additions and 0 deletions

View File

@@ -91,6 +91,9 @@ internal class SearchComponent(
state = lazyListState, state = lazyListState,
reverse = reverse, reverse = reverse,
userScrollEnabled = !state.isDragged, userScrollEnabled = !state.isDragged,
onHideKeyboard = {
state.isSearchBarFocused = false
}
) )
} }
} }

View File

@@ -61,6 +61,7 @@ fun SearchColumn(
state: LazyListState = rememberLazyListState(), state: LazyListState = rememberLazyListState(),
reverse: Boolean = false, reverse: Boolean = false,
userScrollEnabled: Boolean = true, userScrollEnabled: Boolean = true,
onHideKeyboard: () -> Unit = {},
) { ) {
val columns = LocalGridSettings.current.columnCount val columns = LocalGridSettings.current.columnCount
@@ -193,6 +194,7 @@ fun SearchColumn(
selectedProfileIndex = selectedAppProfileIndex, selectedProfileIndex = selectedAppProfileIndex,
onProfileSelected = { onProfileSelected = {
selectedAppProfileIndex = it selectedAppProfileIndex = it
onHideKeyboard()
}, },
isProfileLocked = profileStates.getOrNull(selectedAppProfileIndex)?.locked == true, isProfileLocked = profileStates.getOrNull(selectedAppProfileIndex)?.locked == true,
onProfileLockChange = { p, l -> onProfileLockChange = { p, l ->