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 191c2ebd8e..4814fa126f 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/BaseStatusListFragment.java @@ -815,6 +815,8 @@ public void onToggleExpanded(Status status, boolean isForQuote, String itemID) { adapter.notifyItemChanged(text.getAbsoluteAdapterPosition()); } List headers=findAllHoldersOfType(itemID, HeaderStatusDisplayItem.Holder.class); + if (headers.isEmpty()) + return; HeaderStatusDisplayItem.Holder header=headers.size() > 1 && isForQuote ? headers.get(1) : headers.get(0); if(header!=null) header.animateExpandToggle(); else notifyItemChanged(itemID, HeaderStatusDisplayItem.class);