From 5601da0e22d189d9892ab58a1ddc7f1cefd2316d Mon Sep 17 00:00:00 2001 From: Harris Date: Wed, 15 Dec 2021 17:01:35 +1100 Subject: [PATCH] fix: replace alpha update with isVisible to not intercept tap from message gestures (#809) --- .../securesms/conversation/v2/ConversationActivityV2.kt | 3 +-- app/src/main/res/layout/activity_conversation_v2.xml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index be0c82643e..0c4751d805 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -714,7 +714,6 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe } private fun handleRecyclerViewScrolled() { - val alpha = if (!isScrolledToBottom) 1.0f else 0.0f // FIXME: Checking isScrolledToBottom is a quick fix for an issue where the // typing indicator overlays the recycler view when scrolled up val wasTypingIndicatorVisibleBefore = typingIndicatorViewContainer.isVisible @@ -723,7 +722,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe if (isTypingIndicatorVisibleAfter != wasTypingIndicatorVisibleBefore) { inputBarHeightChanged(inputBar.height) } - scrollToBottomButton.alpha = alpha + scrollToBottomButton.isVisible = !isScrolledToBottom unreadCount = min(unreadCount, layoutManager.findFirstVisibleItemPosition()) updateUnreadCountIndicator() } diff --git a/app/src/main/res/layout/activity_conversation_v2.xml b/app/src/main/res/layout/activity_conversation_v2.xml index 079c932e99..61e1680ef6 100644 --- a/app/src/main/res/layout/activity_conversation_v2.xml +++ b/app/src/main/res/layout/activity_conversation_v2.xml @@ -94,8 +94,7 @@ android:layout_alignParentRight="true" android:layout_alignParentBottom="true" android:layout_marginRight="12dp" - android:layout_marginBottom="72dp" - android:alpha="1"> + android:layout_marginBottom="72dp">