mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
Debug
This commit is contained in:
parent
1b6ddc0c0b
commit
311a298c0c
@ -25,17 +25,15 @@ class ConversationRecyclerView : RecyclerView {
|
|||||||
private fun initialize() {
|
private fun initialize() {
|
||||||
disableClipping()
|
disableClipping()
|
||||||
addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||||
private var maxScrollOffset = 0
|
private var bottomOffset = 0
|
||||||
|
|
||||||
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
|
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
val scrollOffset = recyclerView.computeVerticalScrollOffset()
|
bottomOffset += dy // FIXME: Not sure this is fully accurate, but it seems close enough
|
||||||
maxScrollOffset = max(maxScrollOffset, scrollOffset)
|
delegate?.handleConversationRecyclerViewBottomOffsetChanged(abs(bottomOffset))
|
||||||
val bottomOffset = (maxScrollOffset - scrollOffset)
|
|
||||||
delegate?.handleConversationRecyclerViewBottomOffsetChanged(bottomOffset)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="14dp"
|
||||||
android:layout_marginBottom="72dp"
|
android:layout_marginBottom="72dp"
|
||||||
android:paddingVertical="8dp"
|
android:paddingVertical="8dp"
|
||||||
android:background="@drawable/view_lock_background">
|
android:background="@drawable/view_lock_background">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user