Slyce-Inc / SlyceMessaging

A messaging library for Android
MIT License
968 stars 173 forks source link

Scroll position moves automatically when timestamps are updated #28

Open ssawchenko opened 8 years ago

ssawchenko commented 8 years ago

Found on my Nexus 5 Running 6.0.1 (but I have seen this on other devices as well)

I have noticed an issue where whenever the timestamps are to be updated, the scroll position in the recyclerview will change, such that it seems to push the user "up" the list. You can see this issue more pronounced by changing the timestamps to update every 5 seconds (instead of 62) and always forcing the notifyItemChanged to be called.

Digging around it appears it may be an issue with RecyclerView itself (https://code.google.com/p/android/issues/detail?id=203574)

=== My Fix === I have made some changes to our forked repo that tries to circumvent the problem.

It still needs testing, and the animation now doesn't look as nice when adding new chats, but the scrolling bug appears to be solved by this.

If I have time I will look at making a PR against the lib with these changes.

jchunchar commented 8 years ago

Nice catch -- definitely feel free to make a PR with your fix!