From db09a509957dfa6d8b635f35ae8c7eedafad9fe6 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 4 Jun 2021 14:27:25 +1000 Subject: [PATCH] Fix animation glitch --- .../conversation/v2/ConversationTouchHelperCallback.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationTouchHelperCallback.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationTouchHelperCallback.kt index 83e865818e..be17536036 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationTouchHelperCallback.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationTouchHelperCallback.kt @@ -30,6 +30,7 @@ class ConversationTouchHelperCallback(private val adapter: ConversationAdapter, } override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) { + background.alpha = 0 adapter.notifyItemChanged(viewHolder.adapterPosition) } @@ -58,8 +59,6 @@ class ConversationTouchHelperCallback(private val adapter: ConversationAdapter, messageContentView.right + adjustedDistanceInPx.toInt() + iconSize + spacing, itemViewTop + offset + iconSize ) - } else { - //background.setBounds(0, 0, 0, 0) } background.draw(c) // Perform haptic feedback and invoke onSwipe callback if threshold has been reached