mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-03 13:47:45 +00:00
SES-789 - Scroll to bottom of long new message(s) (#1426)
* WIP * Working - push before cleanup * Fixes #1316 * Cleanup * PR review adjustments * Fixed scrolling when receiving an image based message while keyboard is up * Prevent auto-scroll to last seen item pos in conversation view if <= 3 * Put back <=3 check to scroll * Forced scrolling to bottom of long messages (both sent and received) when already at the bottom of the RecyclerView * Fixes #1364 --------- Co-authored-by: = <=> Co-authored-by: AL-Session <160798022+AL-Session@users.noreply.github.com>
This commit is contained in:
parent
84a399af06
commit
9e62e1eab4
@ -2162,7 +2162,10 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
override fun onChanged() {
|
||||
super.onChanged()
|
||||
if (recyclerView.isScrolledToWithin30dpOfBottom) {
|
||||
recyclerView.scrollToPosition(adapter.itemCount-1)
|
||||
// Note: The adapter itemCount is zero based - so calling this with the itemCount in
|
||||
// a non-zero based manner scrolls us to the bottom of the last message (including
|
||||
// to the bottom of long messages as required by Jira SES-789 / GitHub 1364).
|
||||
recyclerView.scrollToPosition(adapter.itemCount)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user