feat: use POST /notes/feed for following tab with server-side DID filtering

This commit is contained in:
Julien Calixte
2026-03-10 15:53:25 +01:00
parent 9b6bc62044
commit cb15eac854
3 changed files with 58 additions and 9 deletions

View File

@@ -5,7 +5,6 @@ import { computed, ref, Ref } from "vue"
interface UsePublicNoteListOptions {
did?: Ref<string | undefined>
followsFilter?: Ref<Set<string>>
}
export function usePublicNoteList(options?: UsePublicNoteListOptions) {
@@ -45,14 +44,8 @@ export function usePublicNoteList(options?: UsePublicNoteListOptions) {
const getAuthor = (did: string) =>
authors.value.has(did) ? authors.value.get(did)!.handle : ""
const filteredNotes = computed(() => {
const filter = options?.followsFilter?.value
if (!filter || filter.size === 0) return notes.value
return notes.value.filter((n) => filter.has(n.did))
})
return {
notes: filteredNotes,
notes,
isLoading,
canLoadMore,
onLoadMore,