replies timeline only, appview-less bluesky client

dont fail adding uris to timeline if the post wasnt in allPosts already (evil SvelteMap moment)

ptr.pet e3822ccf 6bc6e038

verified
Changed files
+9 -7
src
lib
routes
[...catchall]
+8 -7
src/lib/state.svelte.ts
··· 278 278 allPosts.set(parsedUri.repo, posts); 279 279 } 280 280 posts.set(post.uri, post); 281 - const link: Backlink = { 282 - did: parsedUri.repo, 283 - collection: parsedUri.collection, 284 - rkey: parsedUri.rkey 285 - }; 286 281 if (post.record.reply) { 287 - addBacklinks(post.record.reply.parent.uri, replySource, [link]); 282 + addBacklinks(post.record.reply.parent.uri, replySource, [ 283 + { 284 + did: parsedUri.repo, 285 + collection: parsedUri.collection, 286 + rkey: parsedUri.rkey 287 + } 288 + ]); 288 289 289 290 // update reply index 290 291 const parentDid = extractDidFromUri(post.record.reply.parent.uri); ··· 322 323 const post = allPosts.get(did)?.get(uri); 323 324 // we need to traverse the post chain to add all posts in the chain to the timeline 324 325 // because the parent posts might not be in the timeline yet 325 - const chain = post ? traversePostChain(post) : []; 326 + const chain = post ? traversePostChain(post) : [uri]; 326 327 for (const uri of chain) timeline.add(uri); 327 328 } 328 329 };
+1
src/routes/[...catchall]/+page.svelte
··· 215 215 <TimelineView 216 216 class={currentRoute.path === '/' ? `${animClass}` : 'hidden'} 217 217 client={selectedClient} 218 + showReplies={true} 218 219 bind:postComposerState 219 220 /> 220 221