Thread viewer for Bluesky

some other fixes

+13 -8
+1 -1
src/components/BiohazardDialog.svelte
··· 1 1 <script lang="ts"> 2 2 import { account } from '../models/account.svelte.js'; 3 3 4 - type Props = { onConfirm?: () => void, onClose?: () => void }; 4 + type Props = { onConfirm?: (() => void) | undefined, onClose?: (() => void) | undefined }; 5 5 let { onConfirm = undefined, onClose = undefined }: Props = $props(); 6 6 7 7 function showBiohazard(e: Event) {
+3 -2
src/components/posts/PostHeader.svelte
··· 11 11 12 12 $effect(() => { 13 13 if (avatar) { 14 - window.avatarPreloader.observe(avatar); 14 + let av = avatar; 15 + window.avatarPreloader.observe(av); 15 16 16 17 return () => { 17 - window.avatarPreloader.unobserve(avatar); 18 + window.avatarPreloader.unobserve(av); 18 19 } 19 20 } 20 21 });
+7 -3
src/components/posts/ThreadRootParent.svelte
··· 6 6 let { post }: { post: AnyPost } = $props(); 7 7 </script> 8 8 9 - {#if post instanceof BlockedPost} 9 + {#if post instanceof Post} 10 + <p class="back"> 11 + <i class="fa-solid fa-reply"></i> 12 + <a href={linkToPostThread(post)}>See parent post (@{post.author.handle})</a> 13 + </p> 14 + {:else if post instanceof BlockedPost} 10 15 <div class="back"> 11 16 <BlockedPostView {post} context="parent" reason="Parent post blocked" /> 12 17 </div> ··· 16 21 </p> 17 22 {:else} 18 23 <p class="back"> 19 - <i class="fa-solid fa-reply"></i> 20 - <a href={linkToPostThread(post)}>See parent post (@{post.author.handle})</a> 24 + <i class="fa-solid fa-ban"></i> something went wrong, this shouldn't happen 21 25 </p> 22 26 {/if}
+2 -2
src/models/posts.js
··· 166 166 export class Post extends BasePost { 167 167 /** 168 168 * Post object which is the direct parent of this post. 169 - * @type {ATProtoRecord | undefined} 169 + * @type {AnyPost | undefined} 170 170 */ 171 171 parent; 172 172 173 173 /** 174 174 * Post object which is the root of the whole thread (as specified in the post record). 175 - * @type {ATProtoRecord | undefined} 175 + * @type {AnyPost | undefined} 176 176 */ 177 177 threadRoot; 178 178