mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-20 11:08:31 +00:00
Fix keyboard animation when going back from emoji-search.
This commit is contained in:
committed by
jeffrey-signal
parent
559a665831
commit
188f1c52a9
@@ -231,6 +231,7 @@ open class InsetAwareConstraintLayout @JvmOverloads constructor(
|
||||
interface KeyboardStateListener {
|
||||
fun onKeyboardShown()
|
||||
fun onKeyboardHidden()
|
||||
fun onKeyboardAnimationEnded() = Unit
|
||||
}
|
||||
|
||||
interface WindowInsetsListener {
|
||||
@@ -288,6 +289,10 @@ open class InsetAwareConstraintLayout @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onEnd(animation: WindowInsetsAnimationCompat) {
|
||||
keyboardStateListeners.forEach {
|
||||
it.onKeyboardAnimationEnded()
|
||||
}
|
||||
|
||||
if (overridingKeyboard) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -4718,12 +4718,16 @@ class ConversationFragment :
|
||||
}
|
||||
|
||||
override fun onKeyboardHidden() {
|
||||
closeEmojiSearch()
|
||||
|
||||
if (searchMenuItem?.isActionViewExpanded == true && searchMenuItem?.actionView?.hasFocus() == true) {
|
||||
searchMenuItem?.actionView?.clearFocus()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onKeyboardAnimationEnded() {
|
||||
if (!container.isKeyboardShowing) {
|
||||
closeEmojiSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
Reference in New Issue
Block a user