Profile: pinned toots
All checks were successful
/ depoly (push) Successful in 1m26s

This commit is contained in:
thislight 2024-10-31 00:18:47 +08:00
parent dbddaae05c
commit e7410c7296
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
3 changed files with 28 additions and 7 deletions

View file

@ -87,12 +87,12 @@ export function createTimelineSnapshot<
T extends Timeline<mastodon.DefaultPaginationParams>,
>(
timeline: Accessor<T>,
limit: Accessor<number>,
params: Accessor<TimelineParamsOf<T>>,
): TimelineResource<mastodon.v1.Status[] | undefined> {
const [shot, { refetch }] = createResource(
() => [timeline(), limit()] as const,
() => [timeline(), params()] as const,
async ([tl, limit]) => {
const ls = await tl.list({ limit }).next();
const ls = await tl.list(limit).next();
return ls.value;
},
);