fix(StatusDisplayItem/Quote): use correct method

ChildFragments overwrite the buildDisplayItems to provide the correct
parameters, e.g. flags, additional items, etc. Call those instead of the
default one.
This commit is contained in:
FineFindus
2024-07-06 22:51:14 +02:00
parent bff6ac4a14
commit 91345268e8

View File

@@ -718,7 +718,9 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
} }
if (startIndex!=-1 && endIndex!=-1) { if (startIndex!=-1 && endIndex!=-1) {
ArrayList<StatusDisplayItem> items=StatusDisplayItem.buildItems(this, status, accountID, status, knownAccounts, null, 0); //Only StatusListFragments can display Status/Quotes
assert this instanceof StatusListFragment;
List<StatusDisplayItem> items=((StatusListFragment) this).buildDisplayItems(status);
displayItems.subList(startIndex, endIndex+1).clear(); displayItems.subList(startIndex, endIndex+1).clear();
displayItems.addAll(startIndex, items); displayItems.addAll(startIndex, items);
adapter.notifyItemRangeChanged(startIndex, items.size()); adapter.notifyItemRangeChanged(startIndex, items.size());