Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
rename vars, compare content status id for reply
Browse files Browse the repository at this point in the history
  • Loading branch information
sk22 committed Oct 15, 2023
1 parent 9a985aa commit 30a4d0e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,20 @@ private int removeStatusDisplayItems(Status status, int index, int ancestorFirst
}

protected void removeStatus(Status status){
Status contentStatus=status.getContentStatus();
String id=contentStatus.id;
iterateRemoveStatus(data, id);
iterateRemoveStatus(preloadedData, id);
Status removeStatus=status.getContentStatus();
String removeId=removeStatus.id;
iterateRemoveStatus(data, removeId);
iterateRemoveStatus(preloadedData, removeId);
int ancestorFirstIndex=-1, ancestorLastIndex=-1;
int offset=0;
for(int i=0;i<displayItems.size();i++){
StatusDisplayItem item = displayItems.get(i);
if(id.equals(item.contentStatusID)){
offset+=removeStatusDisplayItems(contentStatus, i, ancestorFirstIndex, ancestorLastIndex, offset);
StatusDisplayItem item=displayItems.get(i);
if(Objects.equals(item.contentStatusID, removeId)){
offset+=removeStatusDisplayItems(removeStatus, i, ancestorFirstIndex, ancestorLastIndex, offset);
ancestorFirstIndex=ancestorLastIndex=-1;
continue;
}
if(item.parentID.equals(status.inReplyToId)){
if(Objects.equals(item.contentStatusID, removeStatus.inReplyToId)){
if(ancestorFirstIndex==-1) ancestorFirstIndex=i;
ancestorLastIndex=i;
}
Expand Down

0 comments on commit 30a4d0e

Please sign in to comment.