This commit is contained in:
parent
dbddaae05c
commit
e7410c7296
3 changed files with 28 additions and 7 deletions
|
@ -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;
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue