From e68e870a7c53ef7e655e34a6457c5ba0fcabaeeb Mon Sep 17 00:00:00 2001 From: FineFindus Date: Sat, 6 Jul 2024 08:25:11 +0200 Subject: [PATCH] fix(StatusDisplayItem): check if headerlist is empty --- .../android/fragments/BaseStatusListFragment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java index 77658b1c5..f214517da 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java @@ -796,8 +796,10 @@ public abstract class BaseStatusListFragment exten if(s.textExpandable!=expandable && list!=null) { s.textExpandable=expandable; List 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(); + } } }