mastodon-android icon indicating copy to clipboard operation
mastodon-android copied to clipboard

don't change the position after new posts were loaded

Open spicewiesel opened this issue 2 years ago • 3 comments

If I am on the top of my timeline I pull down to load new posts. The focus will then be moved to the top of the list to show the newest post. I then have to read down until I see (if I remember) the last post I read before the reload.

In my opinion it would be way more comfortable and consistent to not change the position here, just put the new posts above and let the user read on in the same direction. (Upwards)

Thanks!

spicewiesel avatar May 07 '22 10:05 spicewiesel

This is similar to #70, right?

tjkirch avatar May 11 '22 22:05 tjkirch

Duplicate of #70

grishka avatar May 13 '22 16:05 grishka

I was looking into this to try and fix it (maybe by adding a setting), but it is more complicated than I thought it would be.

I thought fixing this would be a matter of just remembering the reading position and making sure to restore it after the refresh is done, but the current implementation actually discards the data for your current TL and replaces with what was fetched. IF your reading position wasn't too old, restoring it the reading position could still work, but there is no guarantee that it would. This is the code with this behavior: https://github.com/grishka/appkit/blob/master/appkit/src/main/java/me/grishka/appkit/fragments/BaseRecyclerFragment.java#L320-L324

I think it would make sense to mix NEW + OLD together, potentially putting a "Load missing posts" in between if they don't intersect, but that is more complicated than I think would be welcome as a non-contributor (myself) PR.

tinsukE avatar Sep 02 '23 13:09 tinsukE