fix updating wrong status when interacting with reblog

see mastodon#467
This commit is contained in:
sk 2022-12-17 21:01:10 +01:00
parent f8d9d00dac
commit fb5289372d

View File

@ -177,7 +177,7 @@ public abstract class StatusListFragment extends BaseStatusListFragment<Status>{
public void onStatusCountersUpdated(StatusCountersUpdatedEvent ev){ public void onStatusCountersUpdated(StatusCountersUpdatedEvent ev){
for(Status s:data){ for(Status s:data){
if(s.getContentStatus().id.equals(ev.id)){ if(s.getContentStatus().id.equals(ev.id)){
s.update(ev); s.getContentStatus().update(ev);
for(int i=0;i<list.getChildCount();i++){ for(int i=0;i<list.getChildCount();i++){
RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i)); RecyclerView.ViewHolder holder=list.getChildViewHolder(list.getChildAt(i));
if(holder instanceof FooterStatusDisplayItem.Holder footer && footer.getItem().status==s.getContentStatus()){ if(holder instanceof FooterStatusDisplayItem.Holder footer && footer.getItem().status==s.getContentStatus()){