fix: NPE in onHidden method

Why is this the one single method that I have commented in and out 5 times?
This commit is contained in:
LucasGGamerM 2023-03-23 14:09:18 -03:00
parent 6d7bf34f51
commit 880c34c3f0
1 changed files with 18 additions and 18 deletions

View File

@ -108,24 +108,24 @@ public class HomeTimelineFragment extends StatusListFragment {
@Override @Override
protected void onHidden(){ protected void onHidden(){
super.onHidden(); super.onHidden();
if(!data.isEmpty()){ // if(!data.isEmpty()){
String topPostID=displayItems.get(list.getChildAdapterPosition(list.getChildAt(0))-getMainAdapterOffset()).parentID; // String topPostID=displayItems.get(list.getChildAdapterPosition(list.getChildAt(0))-getMainAdapterOffset()).parentID;
if(!topPostID.equals(lastSavedMarkerID)){ // if(!topPostID.equals(lastSavedMarkerID)){
lastSavedMarkerID=topPostID; // lastSavedMarkerID=topPostID;
new SaveMarkers(topPostID, null) // new SaveMarkers(topPostID, null)
.setCallback(new Callback<>(){ // .setCallback(new Callback<>(){
@Override // @Override
public void onSuccess(SaveMarkers.Response result){ // public void onSuccess(SaveMarkers.Response result){
} // }
//
@Override // @Override
public void onError(ErrorResponse error){ // public void onError(ErrorResponse error){
lastSavedMarkerID=null; // lastSavedMarkerID=null;
} // }
}) // })
.exec(accountID); // .exec(accountID);
} // }
} // }
} }
public void onStatusCreated(StatusCreatedEvent ev){ public void onStatusCreated(StatusCreatedEvent ev){