mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-20 02:58:45 +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 {
|
interface KeyboardStateListener {
|
||||||
fun onKeyboardShown()
|
fun onKeyboardShown()
|
||||||
fun onKeyboardHidden()
|
fun onKeyboardHidden()
|
||||||
|
fun onKeyboardAnimationEnded() = Unit
|
||||||
}
|
}
|
||||||
|
|
||||||
interface WindowInsetsListener {
|
interface WindowInsetsListener {
|
||||||
@@ -288,6 +289,10 @@ open class InsetAwareConstraintLayout @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onEnd(animation: WindowInsetsAnimationCompat) {
|
override fun onEnd(animation: WindowInsetsAnimationCompat) {
|
||||||
|
keyboardStateListeners.forEach {
|
||||||
|
it.onKeyboardAnimationEnded()
|
||||||
|
}
|
||||||
|
|
||||||
if (overridingKeyboard) {
|
if (overridingKeyboard) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4718,12 +4718,16 @@ class ConversationFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onKeyboardHidden() {
|
override fun onKeyboardHidden() {
|
||||||
closeEmojiSearch()
|
|
||||||
|
|
||||||
if (searchMenuItem?.isActionViewExpanded == true && searchMenuItem?.actionView?.hasFocus() == true) {
|
if (searchMenuItem?.isActionViewExpanded == true && searchMenuItem?.actionView?.hasFocus() == true) {
|
||||||
searchMenuItem?.actionView?.clearFocus()
|
searchMenuItem?.actionView?.clearFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onKeyboardAnimationEnded() {
|
||||||
|
if (!container.isKeyboardShowing) {
|
||||||
|
closeEmojiSearch()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user