feat: reorder and filter public timeline

This commit is contained in:
Ayo 2023-01-21 20:34:23 +01:00
parent c4de97636d
commit 853c65c056

View file

@ -1,10 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { mastodon } from 'masto'
const paginator = useMastoClient().v1.timelines.listPublic({ limit: 30 }) const paginator = useMastoClient().v1.timelines.listPublic({ limit: 30 })
const stream = useStreaming(client => client.v1.stream.streamPublicTimeline()) const stream = useStreaming(client => client.v1.stream.streamPublicTimeline())
const reorderAndFilter = (items: mastodon.v1.Status[]) => reorderedTimeline(items, 'public')
</script> </script>
<template> <template>
<div> <div>
<TimelinePaginator v-bind="{ paginator, stream }" context="public" /> <TimelinePaginator v-bind="{ paginator, stream }" :preprocess="reorderAndFilter" context="public" />
</div> </div>
</template> </template>