refactor: remove deprecated masto API

This commit is contained in:
三咲智子 2022-12-03 13:36:10 +08:00
parent cc945c4827
commit fff13ee19c
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
15 changed files with 18 additions and 18 deletions

View file

@ -5,7 +5,7 @@ const handle = $(computedEager(() => params.account as string))
definePageMeta({ name: 'account-followers' })
const account = await fetchAccountByHandle(handle)
const paginator = account ? useMasto().accounts.getFollowersIterable(account.id, {}) : null
const paginator = account ? useMasto().accounts.iterateFollowers(account.id, {}) : null
</script>
<template>

View file

@ -5,7 +5,7 @@ const handle = $(computedEager(() => params.account as string))
definePageMeta({ name: 'account-following' })
const account = await fetchAccountByHandle(handle)
const paginator = account ? useMasto().accounts.getFollowingIterable(account.id, {}) : null
const paginator = account ? useMasto().accounts.iterateFollowing(account.id, {}) : null
</script>
<template>

View file

@ -12,9 +12,9 @@ const { data: account } = await useAsyncData(`account:${handle}`, async () => (
)
const { t } = useI18n()
const paginatorPosts = useMasto().accounts.getStatusesIterable(account.value!.id, { excludeReplies: true })
const paginatorPostsWithReply = useMasto().accounts.getStatusesIterable(account.value!.id, { excludeReplies: false })
const paginatorMedia = useMasto().accounts.getStatusesIterable(account.value!.id, { onlyMedia: true, excludeReplies: false })
const paginatorPosts = useMasto().accounts.iterateStatuses(account.value!.id, { excludeReplies: true })
const paginatorPostsWithReply = useMasto().accounts.iterateStatuses(account.value!.id, { excludeReplies: false })
const paginatorMedia = useMasto().accounts.iterateStatuses(account.value!.id, { onlyMedia: true, excludeReplies: false })
const tabs = $computed(() => [
{