fix feed timelines detecting 'end' correctly
113 unmodified linesExpand all11411511611711811912012112212212312312412512661 unmodified lines113 unmodified linesExpand all } }
loaderState.loaded(); console.log('feed loaded', result?.end); if (result?.end) loaderState.complete(); } catch (error) { loadError = `${error}`; loaderState.error(); loading = false; return; }
loading = false; };61 unmodified lines757 unmodified linesExpand all75875976076176276276376476576610 unmodified lines777778779780781781782783784785316 unmodified linesExpand all757 unmodified linesExpand allexport const fetchFeed = async ( client: AtpClient, feedUri: string, feedServiceDid: string, limit: number = 25 limit: number = 10) => { const userDid = client.user?.did; if (!userDid) return;
10 unmodified lines m.fetchFeedSkeleton(client, feedUri, feedServiceDid, cursor?.value, limit) ); if (!skeleton) throw `failed to fetch feed skeleton for ${feedUri}`;
const newCursor = { value: skeleton.cursor, end: !skeleton.cursor }; const newCursor = { value: skeleton.cursor, end: skeleton.feed.length === 0 }; userFeedCursors.set(feedUri, newCursor);
const uris = skeleton.feed.slice(0, limit).map((item) => item.post as ResourceUri);
316 unmodified linesExpand all