refactor: remove deprecated masto API
This commit is contained in:
parent
cc945c4827
commit
fff13ee19c
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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(() => [
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const paginator = useMasto().blocks.getIterator()
|
||||
const paginator = useMasto().blocks.iterate()
|
||||
|
||||
useHeadFixed({
|
||||
title: 'Blocked users',
|
||||
|
|
|
@ -3,7 +3,7 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const paginator = useMasto().bookmarks.getIterator()
|
||||
const paginator = useMasto().bookmarks.iterate()
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const paginator = useMasto().conversations.getIterator()
|
||||
const paginator = useMasto().conversations.iterate()
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const paginator = useMasto().domainBlocks.getIterator()
|
||||
const paginator = useMasto().domainBlocks.iterate()
|
||||
|
||||
useHeadFixed({
|
||||
title: 'Blocked domains',
|
||||
|
|
|
@ -3,7 +3,7 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const paginator = useMasto().favourites.getIterator()
|
||||
const paginator = useMasto().favourites.iterate()
|
||||
const { t } = useI18n()
|
||||
|
||||
useHeadFixed({
|
||||
|
|
|
@ -11,7 +11,7 @@ if (useRoute().path === '/signin/callback') {
|
|||
useRouter().push('/home')
|
||||
}
|
||||
|
||||
const paginator = useMasto().timelines.getHomeIterable()
|
||||
const paginator = useMasto().timelines.iterateHome()
|
||||
const stream = await useMasto().stream.streamUser()
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const paginator = useMasto().mutes.getIterator()
|
||||
const paginator = useMasto().mutes.iterate()
|
||||
|
||||
useHeadFixed({
|
||||
title: 'Muted users',
|
||||
|
|
|
@ -5,8 +5,8 @@ definePageMeta({
|
|||
|
||||
const { t } = useI18n()
|
||||
|
||||
const paginatorAll = useMasto().notifications.getIterator()
|
||||
const paginatorMention = useMasto().notifications.getIterator({ types: ['mention'] })
|
||||
const paginatorAll = useMasto().notifications.iterate()
|
||||
const paginatorMention = useMasto().notifications.iterate({ types: ['mention'] })
|
||||
|
||||
const { clearNotifications } = useNotifications()
|
||||
onActivated(clearNotifications)
|
||||
|
|
|
@ -3,7 +3,7 @@ definePageMeta({
|
|||
middleware: 'auth',
|
||||
})
|
||||
|
||||
const paginator = useMasto().accounts.getStatusesIterable(currentUser.value!.account.id, { pinned: true })
|
||||
const paginator = useMasto().accounts.iterateStatuses(currentUser.value!.account.id, { pinned: true })
|
||||
const { t } = useI18n()
|
||||
|
||||
useHeadFixed({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const paginator = useMasto().timelines.getPublicIterable()
|
||||
const paginator = useMasto().timelines.iteratePublic()
|
||||
const stream = await useMasto().stream.streamPublicTimeline()
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
const paginator = useMasto().timelines.getPublicIterable({ local: true })
|
||||
const paginator = useMasto().timelines.iteratePublic({ local: true })
|
||||
const stream = await useMasto().stream.streamCommunityTimeline()
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ const tagName = $(computedEager(() => params.tag as string))
|
|||
|
||||
const { data: tag, refresh } = $(await useAsyncData(() => useMasto().tags.fetch(tagName)))
|
||||
|
||||
const paginator = useMasto().timelines.getHashtagIterable(tagName)
|
||||
const paginator = useMasto().timelines.iterateHashtag(tagName)
|
||||
const stream = await useMasto().stream.streamTagTimeline(tagName)
|
||||
onBeforeUnmount(() => stream.disconnect())
|
||||
|
||||
|
|
Loading…
Reference in a new issue