diff --git a/components/conversation/ConversationPaginator.vue b/components/conversation/ConversationPaginator.vue index 40a4c7c7..72ed1840 100644 --- a/components/conversation/ConversationPaginator.vue +++ b/components/conversation/ConversationPaginator.vue @@ -4,10 +4,23 @@ import type { Paginator, mastodon } from 'masto' const { paginator } = defineProps<{ paginator: Paginator }>() + +function preprocess(items: mastodon.v1.Conversation[]) { + const filteredIndices = items.map( + (items, index) => ( + { + status: items.lastStatus, + index, + })) + .filter(item => !!item.status?.filtered?.find(filter => filter.filter.filterAction === 'hide' && filter.filter.context.includes('thread'))) + .map(item => item.index) + + return items.filter((_, index) => !filteredIndices.includes(index)) +}