Presently, i'm using DiffUtil.Result to calculate the result-difference between two lists, but i find it having low control over automatic scrolls. Let's say, i want to allow the list to scroll when a new item is inserted under certain conditions, and not with other.
Use case: Imagine i am displaying on the screen a list of all my friends in a chat. The list is sorted with the following order: online-offline. There are two scenarios here:
the user that was previously offline (probably at the end of the list) is now online. The data associated with that user has changed, and the new list positions him almost at the top of the list. I want the list to scroll to that position.
on the other hand, if an user is online (for example, in second position), and then goes offline, i don't want the list to scroll to the bottom (because an online user has no relevance).
So is there away of allowing this granularity over 'recyclerView' scrolls?