replies timeline only, appview-less bluesky client

fix: if post depth is 2 or more dont show record embed

ptr.pet dbb96e6f 424bd6cf

verified
Changed files
+19 -12
src
components
+19 -12
src/components/BskyPost.svelte
··· 30 30 did: Did; 31 31 rkey: RecordKey; 32 32 // replyBacklinks?: Backlinks; 33 + depth?: number; 33 34 data?: PostWithUri; 34 35 mini?: boolean; 35 36 isOnPostComposer?: boolean; ··· 41 42 client, 42 43 did, 43 44 rkey, 45 + depth = 0, 44 46 data, 45 47 mini, 46 48 onQuote, ··· 265 267 {@const embed = record.embed} 266 268 <div class="mt-2"> 267 269 {#snippet embedPost(uri: ResourceUri)} 268 - {@const parsedUri = expect(parseCanonicalResourceUri(uri))} 269 - <!-- reject recursive quotes --> 270 - {#if !(did === parsedUri.repo && rkey === parsedUri.rkey)} 271 - <BskyPost 272 - {client} 273 - did={parsedUri.repo} 274 - rkey={parsedUri.rkey} 275 - {isOnPostComposer} 276 - {onQuote} 277 - {onReply} 278 - /> 270 + {#if depth < 2} 271 + {@const parsedUri = expect(parseCanonicalResourceUri(uri))} 272 + <!-- reject recursive quotes --> 273 + {#if !(did === parsedUri.repo && rkey === parsedUri.rkey)} 274 + <BskyPost 275 + {client} 276 + depth={depth + 1} 277 + did={parsedUri.repo} 278 + rkey={parsedUri.rkey} 279 + {isOnPostComposer} 280 + {onQuote} 281 + {onReply} 282 + /> 283 + {:else} 284 + <span>you think you're funny with that recursive quote but i'm onto you</span> 285 + {/if} 279 286 {:else} 280 - <span>you think you're funny with that recursive quote but i'm onto you</span> 287 + {@render embedBadge(record)} 281 288 {/if} 282 289 {/snippet} 283 290 {#if embed.$type === 'app.bsky.embed.images'}