forked from Mirrors/elk
feat: reorder and filter public timeline
This commit is contained in:
parent
c4de97636d
commit
853c65c056
1 changed files with 4 additions and 1 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue