mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-24 21:18:31 +00:00
Small fix to properly scroll down in chat messages view when a new one is sent or received
This commit is contained in:
parent
b89407d741
commit
a86a466ca6
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
|
||||||
|
|
||||||
private val observer = object : RecyclerView.AdapterDataObserver() {
|
private val observer = object : RecyclerView.AdapterDataObserver() {
|
||||||
override fun onItemRangeInserted(positionStart: Int, itemCount: Int) {
|
override fun onItemRangeInserted(positionStart: Int, itemCount: Int) {
|
||||||
if (positionStart == adapter.itemCount - 1) {
|
if (itemCount == 1 && positionStart > 0) {
|
||||||
adapter.notifyItemChanged(positionStart - 1) // For grouping purposes
|
adapter.notifyItemChanged(positionStart - 1) // For grouping purposes
|
||||||
scrollToBottom()
|
scrollToBottom()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue