Thread viewer for Bluesky

fixed loading blocked quote in incognito mode

+13 -1
+13 -1
src/components/posts/BlockedPostView.svelte
··· 34 34 } 35 35 } 36 36 37 + function canShowLoadThreadLink(reloadedPost: Post) { 38 + let viewerInfo = reloadedPost.author.viewer; 39 + 40 + if (viewerInfo) { 41 + // don't show the link if author is blocked/blocking us, since full thread won't load anyway 42 + return !(viewerInfo.blockedBy || viewerInfo.blocking); 43 + } else { 44 + // in incognito mode there will be no author viewer info - but in this case we can always load the thread 45 + return true; 46 + } 47 + } 48 + 37 49 function blockStatus() { 38 50 if (post instanceof DetachedQuotePost) { 39 51 return undefined; ··· 71 83 72 84 <ReferencedPostAuthorLink {post} status={blockStatus()} /> 73 85 74 - {#if !(reloadedPost.author.viewer.blockedBy || reloadedPost.author.viewer.blocking)} 86 + {#if canShowLoadThreadLink(reloadedPost)} 75 87 <span class="separator">&bull;</span> 76 88 77 89 <PostSubtreeLink post={reloadedPost} title="Load thread" />