Fix SearchView loosing focus.

This commit is contained in:
Sagar
2025-04-16 06:16:17 +05:30
committed by Cody Henthorne
parent cd98ccbf00
commit 16b4b3b6b7
2 changed files with 7 additions and 2 deletions

View File

@@ -194,6 +194,7 @@ open class InsetAwareConstraintLayout @JvmOverloads constructor(
protected fun resetKeyboardGuideline() {
clearKeyboardGuidelineOverride()
keyboardGuideline?.setGuidelineEnd(navigationBarGuideline.guidelineEnd)
keyboardAnimator.endingGuidelineEnd = navigationBarGuideline.guidelineEnd
}
private fun getKeyboardHeight(): Int {

View File

@@ -3275,7 +3275,7 @@ class ConversationFragment :
multiselectItemDecoration.hideShade(binding.conversationItemRecycler)
ViewUtil.fadeOut(binding.reactionsShade, resources.getInteger(R.integer.reaction_scrubber_hide_duration), View.GONE)
if (focusedView == composeText) {
if (focusedView == composeText || searchMenuItem?.isActionViewExpanded == true) {
container.showSoftkey(composeText)
}
}
@@ -4349,7 +4349,11 @@ class ConversationFragment :
isEnabled = false
}
override fun onKeyboardShown() = Unit
override fun onKeyboardShown() {
if (searchMenuItem?.isActionViewExpanded == true && searchMenuItem?.actionView?.hasFocus() == false) {
searchMenuItem?.actionView?.requestFocus()
}
}
override fun onKeyboardHidden() {
closeEmojiSearch()