Hide keyboard when a Tracker SearchResultItem is clicked (#1168)

* Hide keyboard on select

* Code Review Suggestion
This commit is contained in:
Roshan Varughese 2024-08-28 00:26:55 +12:00 committed by GitHub
parent d26c010e57
commit 7ca64a67c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -224,6 +224,7 @@ private fun SearchResultItem(
) {
val context = LocalContext.current
val clipboardManager: ClipboardManager = LocalClipboardManager.current
val focusManager = LocalFocusManager.current
val type = trackSearch.publishing_type.toLowerCase(Locale.current).capitalize(Locale.current)
val status = trackSearch.publishing_status.toLowerCase(Locale.current).capitalize(Locale.current)
val description = trackSearch.summary.trim()
@ -243,7 +244,10 @@ private fun SearchResultItem(
)
.combinedClickable(
onLongClick = { dropDownMenuExpanded = true },
onClick = onClick,
onClick = {
focusManager.clearFocus()
onClick()
},
)
.padding(12.dp),
) {