2022-11-18 12:37:22 +03:00
|
|
|
<script setup lang="ts">
|
2024-01-09 11:56:15 +03:00
|
|
|
import type { mastodon } from 'masto'
|
2022-11-18 12:37:22 +03:00
|
|
|
|
|
|
|
const { paginator } = defineProps<{
|
2024-01-09 11:56:15 +03:00
|
|
|
paginator: mastodon.Paginator<mastodon.v1.Conversation[], mastodon.DefaultPaginationParams>
|
2022-11-18 12:37:22 +03:00
|
|
|
}>()
|
2023-01-23 22:33:21 +03:00
|
|
|
|
|
|
|
function preprocess(items: mastodon.v1.Conversation[]): mastodon.v1.Conversation[] {
|
2023-02-05 18:05:42 +03:00
|
|
|
const isAuthored = (conversation: mastodon.v1.Conversation) => conversation.lastStatus ? conversation.lastStatus.account.id === currentUser.value?.account.id : false
|
|
|
|
return items.filter(item => isAuthored(item) || !item.lastStatus?.filtered?.find(
|
2023-01-23 22:33:21 +03:00
|
|
|
filter => filter.filter.filterAction === 'hide' && filter.filter.context.includes('thread'),
|
|
|
|
))
|
|
|
|
}
|
2022-11-18 12:37:22 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-01-23 22:33:21 +03:00
|
|
|
<CommonPaginator :paginator="paginator" :preprocess="preprocess">
|
2022-11-18 12:37:22 +03:00
|
|
|
<template #default="{ item }">
|
|
|
|
<ConversationCard
|
|
|
|
:conversation="item"
|
2022-11-23 05:16:31 +03:00
|
|
|
border="b base" py-1
|
2022-11-18 12:37:22 +03:00
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</CommonPaginator>
|
|
|
|
</template>
|