diff --git a/components/common/CommonPaginator.vue b/components/common/CommonPaginator.vue index 1191f17d..19f14677 100644 --- a/components/common/CommonPaginator.vue +++ b/components/common/CommonPaginator.vue @@ -2,7 +2,7 @@ // @ts-expect-error missing types import { DynamicScroller } from 'vue-virtual-scroller' import 'vue-virtual-scroller/dist/vue-virtual-scroller.css' -import type { Paginator, WsEvents } from 'masto' +import type { Paginator, WsEvents, mastodon } from 'masto' const { paginator, @@ -11,13 +11,15 @@ const { virtualScroller = false, eventType = 'update', preprocess, + context = 'public', } = defineProps<{ paginator: Paginator keyProp?: keyof T virtualScroller?: boolean stream?: Promise eventType?: 'notification' | 'update' - preprocess?: (items: (U | T)[]) => U[] + preprocess?: (items: (U | T)[], context?: mastodon.v2.FilterContext) => U[] + context?: mastodon.v2.FilterContext }>() defineSlots<{ @@ -42,7 +44,7 @@ defineSlots<{ const { t } = useI18n() -const { items, prevItems, update, state, endAnchor, error } = usePaginator(paginator, stream, eventType, preprocess) +const { items, prevItems, update, state, endAnchor, error } = usePaginator(paginator, stream, eventType, preprocess, context)