From 174d934915f4fd2157493876333cd0068c4b44e8 Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Mon, 14 Sep 2026 12:13:44 -0300 Subject: [PATCH] Update visibility on kb changes. --- .../conversation/v2/ConversationFragment.kt | 12 +++++++++++- app/src/main/res/layout/v2_conversation_overlay.xml | 7 ++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationFragment.kt index c907680081..a8b67d0a12 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationFragment.kt @@ -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 diff --git a/app/src/main/res/layout/v2_conversation_overlay.xml b/app/src/main/res/layout/v2_conversation_overlay.xml index 17372fb78f..86caa1fac2 100644 --- a/app/src/main/res/layout/v2_conversation_overlay.xml +++ b/app/src/main/res/layout/v2_conversation_overlay.xml @@ -1,9 +1,14 @@ + android:layout_height="match_parent" + android:visibility="invisible">