Update visibility on kb changes.

This commit is contained in:
Alex Hart
2026-09-15 18:26:03 -04:00
committed by Greyson Parrelli
parent aec7c5eaa2
commit 174d934915
2 changed files with 17 additions and 2 deletions
@@ -4189,14 +4189,22 @@ class ConversationFragment :
return
}
if (reactionDelegate.isShowing()) {
// The overlay ignores a show while it is up, and nothing below would be undone by a hide that never comes.
Log.w(TAG, "Long press while the reaction overlay is still showing. Ignoring.")
return
}
val messageRecord = item.getMessageRecord()
// Held, not re-read: teardown has to work from a screen that is already going.
val recycler = binding.conversationItemRecycler
val overlay = conversationOverlay
val shade = overlayBinding.reactionsShade
multiselectItemDecoration.setFocusedItem(MultiselectPart.Message(item.conversationMessage))
recycler.invalidateItemDecorations()
overlay.visibility = View.VISIBLE
shade.visibility = View.VISIBLE
recycler.suppressLayout(true)
@@ -4281,8 +4289,10 @@ class ConversationFragment :
override fun onHide() {
viewModel.setIsReactionDelegateShowing(false)
// Likewise: otherwise the list stays frozen and the message invisible.
// Likewise: otherwise the list stays frozen, the message invisible, and the idle
// overlay in front of the chat for touch purposes.
recycler.suppressLayout(false)
overlay.visibility = View.INVISIBLE
multiselectItemDecoration.setFocusedItem(null)
recycler.invalidateItemDecorations()
bodyBubble.visibility = View.VISIBLE
@@ -1,9 +1,14 @@
<?xml version="1.0" encoding="utf-8"?><!--
The long press overlay and its shade, drawn above the scaffold so a closing keyboard never resizes them.
Invisible rather than gone while idle: invisible keeps this laid out, which the overlay needs in order
to measure itself and to project a row's position into its coordinate space, but takes it out of touch
dispatch so an idle overlay cannot swallow a gesture meant for the chat beneath it.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:visibility="invisible">
<FrameLayout
android:id="@+id/reactions_shade"