Created
May 6, 2020 14:42
-
-
Save samiuelson/c24dd4f4ec3223274c3cce045ac7ddab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun updateMessagesList(messages: List<Message>) { | |
adapter.submitList(messages) | |
adapter.notifyDataSetChanged() | |
val scrollTarget = adapter.itemCount | |
messageListSmoothScroller.targetPosition = scrollTarget | |
messagesList.layoutManager?.startSmoothScroll(messageListSmoothScroller) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment