This commit is contained in:
Grishka 2023-01-21 19:12:39 -03:00 committed by LucasGGamerM
parent 55a2ae8748
commit 8d827054bf
1 changed files with 2 additions and 4 deletions

View File

@ -98,10 +98,8 @@ public class HomeTimelineFragment extends FabStatusListFragment {
@Override
protected void onHidden(){
super.onHidden();
// workaround for mastodon#512. revert if fixed otherwise
int position = list.getChildAdapterPosition(list.getChildAt(0))-getMainAdapterOffset();
if(!data.isEmpty() && position >= 0 && position < displayItems.size()){
String topPostID=displayItems.get(position).parentID;
if(!data.isEmpty()){
String topPostID=displayItems.get(Math.max(0, list.getChildAdapterPosition(list.getChildAt(0))-getMainAdapterOffset())).parentID;
if(!topPostID.equals(lastSavedMarkerID)){
lastSavedMarkerID=topPostID;
new SaveMarkers(topPostID, null)