feat: reorder and filter account timeline
This commit is contained in:
parent
ff211ea77e
commit
73a6678cb3
@ -3,7 +3,7 @@ import type { mastodon } from 'masto'
|
||||
|
||||
const paginator = useMastoClient().v1.timelines.listHome({ limit: 30 })
|
||||
const stream = $(useStreaming(client => client.v1.stream.streamUser()))
|
||||
const reorderAndFilter = (items: mastodon.v1.Status[]) => reorderedTimeline(items, 'home')
|
||||
const reorderAndFilter = (items: mastodon.v1.Status[]) => reorderedTimeline(items, 'account')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
|
||||
const params = useRoute().params
|
||||
const handle = $(computedEager(() => params.account as string))
|
||||
|
||||
@ -8,6 +10,8 @@ const { t } = useI18n()
|
||||
|
||||
const account = await fetchAccountByHandle(handle)
|
||||
|
||||
const reorderAndFilter = (items: mastodon.v1.Status[]) => reorderedTimeline(items, 'home')
|
||||
|
||||
const paginator = useMastoClient().v1.accounts.listStatuses(account.id, { limit: 30, excludeReplies: true })
|
||||
|
||||
if (account) {
|
||||
@ -20,6 +24,6 @@ if (account) {
|
||||
<template>
|
||||
<div>
|
||||
<AccountTabs />
|
||||
<TimelinePaginator :paginator="paginator" :preprocess="reorderedTimeline" context="account" :account="account" />
|
||||
<TimelinePaginator :paginator="paginator" :preprocess="reorderAndFilter" context="account" :account="account" />
|
||||
</div>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user