diff --git a/components/account/AccountCard.vue b/components/account/AccountCard.vue
index 199d587a..5fa3c9c6 100644
--- a/components/account/AccountCard.vue
+++ b/components/account/AccountCard.vue
@@ -1,9 +1,26 @@
@@ -11,8 +28,8 @@ defineProps<{
diff --git a/components/account/AccountPaginator.client.vue b/components/account/AccountPaginator.client.vue
index 0e75d1d5..14389294 100644
--- a/components/account/AccountPaginator.client.vue
+++ b/components/account/AccountPaginator.client.vue
@@ -4,16 +4,30 @@ import type { Account, Paginator } from 'masto'
const { paginator } = defineProps<{
paginator: Paginator
}>()
+
+const masto = await useMasto()
+
+const metadataMap = $ref<{ [key: string]: { following?: boolean } }>({})
+async function onNewItems(items: Account[]) {
+ for (const item of items)
+ metadataMap[item.id] = { following: undefined }
+
+ const relationships = await masto.accounts.fetchRelationships(items.map(item => item.id))
+ for (const rel of relationships)
+ metadataMap[rel.id].following = rel.following
+}
diff --git a/components/common/CommonPaginator.vue b/components/common/CommonPaginator.vue
index 4b199d34..d7e14244 100644
--- a/components/common/CommonPaginator.vue
+++ b/components/common/CommonPaginator.vue
@@ -1,4 +1,5 @@
diff --git a/composables/paginator.ts b/composables/paginator.ts
index a9c9ec11..a21f1c91 100644
--- a/composables/paginator.ts
+++ b/composables/paginator.ts
@@ -4,6 +4,7 @@ import type { PaginatorState } from '~/types'
export function usePaginator(paginator: Paginator) {
const state = ref('idle')
const items = ref([])
+ const newItems = ref([])
const endAnchor = ref()
const bound = reactive(useElementBounding(endAnchor))
@@ -19,7 +20,8 @@ export function usePaginator(paginator: Paginator) {
const result = await paginator.next()
if (result.value?.length) {
- items.value.push(...result.value)
+ newItems.value = result.value
+ items.value.push(...newItems.value)
state.value = 'idle'
}
else {
@@ -50,6 +52,7 @@ export function usePaginator(paginator: Paginator) {
return {
items,
+ newItems,
state,
error,
endAnchor,