Fix #512
This commit is contained in:
parent
55a2ae8748
commit
8d827054bf
@ -98,10 +98,8 @@ public class HomeTimelineFragment extends FabStatusListFragment {
|
|||||||
@Override
|
@Override
|
||||||
protected void onHidden(){
|
protected void onHidden(){
|
||||||
super.onHidden();
|
super.onHidden();
|
||||||
// workaround for mastodon#512. revert if fixed otherwise
|
if(!data.isEmpty()){
|
||||||
int position = list.getChildAdapterPosition(list.getChildAt(0))-getMainAdapterOffset();
|
String topPostID=displayItems.get(Math.max(0, list.getChildAdapterPosition(list.getChildAt(0))-getMainAdapterOffset())).parentID;
|
||||||
if(!data.isEmpty() && position >= 0 && position < displayItems.size()){
|
|
||||||
String topPostID=displayItems.get(position).parentID;
|
|
||||||
if(!topPostID.equals(lastSavedMarkerID)){
|
if(!topPostID.equals(lastSavedMarkerID)){
|
||||||
lastSavedMarkerID=topPostID;
|
lastSavedMarkerID=topPostID;
|
||||||
new SaveMarkers(topPostID, null)
|
new SaveMarkers(topPostID, null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user