rename vars, compare content status id for reply
This commit is contained in:
parent
9a985aad29
commit
30a4d0efd9
|
@ -209,20 +209,20 @@ public abstract class StatusListFragment extends BaseStatusListFragment<Status>
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void removeStatus(Status status){
|
protected void removeStatus(Status status){
|
||||||
Status contentStatus=status.getContentStatus();
|
Status removeStatus=status.getContentStatus();
|
||||||
String id=contentStatus.id;
|
String removeId=removeStatus.id;
|
||||||
iterateRemoveStatus(data, id);
|
iterateRemoveStatus(data, removeId);
|
||||||
iterateRemoveStatus(preloadedData, id);
|
iterateRemoveStatus(preloadedData, removeId);
|
||||||
int ancestorFirstIndex=-1, ancestorLastIndex=-1;
|
int ancestorFirstIndex=-1, ancestorLastIndex=-1;
|
||||||
int offset=0;
|
int offset=0;
|
||||||
for(int i=0;i<displayItems.size();i++){
|
for(int i=0;i<displayItems.size();i++){
|
||||||
StatusDisplayItem item=displayItems.get(i);
|
StatusDisplayItem item=displayItems.get(i);
|
||||||
if(id.equals(item.contentStatusID)){
|
if(Objects.equals(item.contentStatusID, removeId)){
|
||||||
offset+=removeStatusDisplayItems(contentStatus, i, ancestorFirstIndex, ancestorLastIndex, offset);
|
offset+=removeStatusDisplayItems(removeStatus, i, ancestorFirstIndex, ancestorLastIndex, offset);
|
||||||
ancestorFirstIndex=ancestorLastIndex=-1;
|
ancestorFirstIndex=ancestorLastIndex=-1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(item.parentID.equals(status.inReplyToId)){
|
if(Objects.equals(item.contentStatusID, removeStatus.inReplyToId)){
|
||||||
if(ancestorFirstIndex==-1) ancestorFirstIndex=i;
|
if(ancestorFirstIndex==-1) ancestorFirstIndex=i;
|
||||||
ancestorLastIndex=i;
|
ancestorLastIndex=i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue