From 311a298c0ca95ff04b5f5f47f8f43a963bf64495 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Thu, 24 Jun 2021 09:34:16 +1000 Subject: [PATCH] Debug --- .../securesms/conversation/v2/ConversationRecyclerView.kt | 8 +++----- app/src/main/res/layout/view_input_bar_recording.xml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationRecyclerView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationRecyclerView.kt index 246b84668f..e2d37c0fca 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationRecyclerView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationRecyclerView.kt @@ -25,17 +25,15 @@ class ConversationRecyclerView : RecyclerView { private fun initialize() { disableClipping() addOnScrollListener(object : RecyclerView.OnScrollListener() { - private var maxScrollOffset = 0 + private var bottomOffset = 0 override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) { // Do nothing } override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { - val scrollOffset = recyclerView.computeVerticalScrollOffset() - maxScrollOffset = max(maxScrollOffset, scrollOffset) - val bottomOffset = (maxScrollOffset - scrollOffset) - delegate?.handleConversationRecyclerViewBottomOffsetChanged(bottomOffset) + bottomOffset += dy // FIXME: Not sure this is fully accurate, but it seems close enough + delegate?.handleConversationRecyclerViewBottomOffsetChanged(abs(bottomOffset)) } }) } diff --git a/app/src/main/res/layout/view_input_bar_recording.xml b/app/src/main/res/layout/view_input_bar_recording.xml index b2de3fd0c4..5a0e32a085 100644 --- a/app/src/main/res/layout/view_input_bar_recording.xml +++ b/app/src/main/res/layout/view_input_bar_recording.xml @@ -156,7 +156,7 @@ android:gravity="center" android:layout_alignParentEnd="true" android:layout_alignParentBottom="true" - android:layout_marginEnd="16dp" + android:layout_marginEnd="14dp" android:layout_marginBottom="72dp" android:paddingVertical="8dp" android:background="@drawable/view_lock_background">