fix(StatusDisplayItem): check if headerlist is empty

This commit is contained in:
FineFindus 2024-07-06 08:25:11 +02:00
parent 0788b03828
commit e68e870a7c
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 4 additions and 2 deletions

View File

@ -796,8 +796,10 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
if(s.textExpandable!=expandable && list!=null) {
s.textExpandable=expandable;
List<HeaderStatusDisplayItem.Holder> headers=findAllHoldersOfType(holder.getItemID(), HeaderStatusDisplayItem.Holder.class);
HeaderStatusDisplayItem.Holder header=headers.size() > 1 && isForQuote ? headers.get(1) : headers.get(0);
if(header!=null) header.bindCollapseButton();
if(headers!=null && !headers.isEmpty()){
HeaderStatusDisplayItem.Holder header=headers.size() > 1 && isForQuote ? headers.get(1) : headers.get(0);
if(header!=null) header.bindCollapseButton();
}
}
}