fix: fetch of followed tags on public timelines

This commit is contained in:
Ayo Ayco 2025-11-22 19:16:04 +01:00
parent 65cd76a108
commit dc9d72189f
3 changed files with 12 additions and 6 deletions

View file

@ -7,9 +7,11 @@ function reorderAndFilter(items: mastodon.v1.Status[]) {
return reorderedTimeline(items, 'public')
}
let followedTags: mastodon.v1.Tag[] | undefined
let followedTags: mastodon.v1.Tag[]
if (currentUser.value !== undefined) {
followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
const { client } = useMasto()
const paginator = client.value.v1.followedTags.list()
followedTags = (await paginator.values().next()).value ?? []
}
</script>

View file

@ -7,9 +7,11 @@ function reorderAndFilter(items: mastodon.v1.Status[]) {
return reorderedTimeline(items, 'public')
}
let followedTags: mastodon.v1.Tag[] | undefined
let followedTags: mastodon.v1.Tag[]
if (currentUser.value !== undefined) {
followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
const { client } = useMasto()
const paginator = client.value.v1.followedTags.list()
followedTags = (await paginator.values().next()).value ?? []
}
</script>

View file

@ -26,9 +26,11 @@ onReactivated(() => {
refresh()
})
let followedTags: mastodon.v1.Tag[] | undefined
let followedTags: mastodon.v1.Tag[]
if (currentUser.value !== undefined) {
followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
const { client } = useMasto()
const paginator = client.value.v1.followedTags.list()
followedTags = (await paginator.values().next()).value ?? []
}
</script>