fix "load missing more" being hidden

closes sk22#482
This commit is contained in:
sk
2023-04-22 20:14:07 +02:00
parent 40bfdea5b1
commit 44d4eada51

View File

@@ -201,8 +201,6 @@ public abstract class StatusDisplayItem{
} }
if(addFooter){ if(addFooter){
items.add(new FooterStatusDisplayItem(parentID, fragment, statusForContent, accountID)); items.add(new FooterStatusDisplayItem(parentID, fragment, statusForContent, accountID));
if(status.hasGapAfter && !(fragment instanceof ThreadFragment))
items.add(new GapStatusDisplayItem(parentID, fragment));
} }
int i=1; int i=1;
for(StatusDisplayItem item:items){ for(StatusDisplayItem item:items){
@@ -210,13 +208,16 @@ public abstract class StatusDisplayItem{
item.index=i++; item.index=i++;
} }
if (!statusForContent.filterRevealed) { ArrayList<StatusDisplayItem> result = statusForContent.filterRevealed ? items :
return new ArrayList<>(List.of( new ArrayList<>(List.of(new WarningFilteredStatusDisplayItem(parentID, fragment, statusForContent, items)));
new WarningFilteredStatusDisplayItem(parentID, fragment, statusForContent, items)
)); if (addFooter && status.hasGapAfter && !(fragment instanceof ThreadFragment)) {
StatusDisplayItem gap = new GapStatusDisplayItem(parentID, fragment);
gap.index = i++;
result.add(gap);
} }
return items; return result;
} }
public static void buildPollItems(String parentID, BaseStatusListFragment fragment, Poll poll, List<StatusDisplayItem> items){ public static void buildPollItems(String parentID, BaseStatusListFragment fragment, Poll poll, List<StatusDisplayItem> items){