Attempt to fix wrong boosts count

This commit is contained in:
Lim Chee Aun 2024-03-16 13:36:23 +08:00
parent d1965a84b5
commit 2723ef4593

View file

@ -535,15 +535,15 @@ const TimelineItem = memo(
const url = instance
? `/${instance}/s/${actualStatusID}`
: `/s/${actualStatusID}`;
let title = '';
if (type === 'boosts') {
title = `${items.length} Boosts`;
} else if (type === 'pinned') {
title = 'Pinned posts';
}
const isCarousel = type === 'boosts' || type === 'pinned';
if (items) {
const fItems = filteredItems(items, filterContext);
let title = '';
if (type === 'boosts') {
title = `${fItems.length} Boosts`;
} else if (type === 'pinned') {
title = 'Pinned posts';
}
const isCarousel = type === 'boosts' || type === 'pinned';
if (isCarousel) {
// Here, we don't hide filtered posts, but we sort them last
fItems.sort((a, b) => {