tangled
alpha
login
or
join now
whey.party
/
red-dwarf
82
fork
atom
an independent Bluesky client using Constellation, PDS Queries, and other services
reddwarf.app
frontend
spa
bluesky
reddwarf
microcosm
client
app
82
fork
atom
overview
issues
25
pulls
pipelines
fix "read more"
whey.party
1 month ago
edfa3ccd
a9e4b8c0
+16
-5
2 changed files
expand all
collapse all
unified
split
src
components
UniversalPostRenderer.tsx
routes
profile.$did
post.$rkey.tsx
+4
-3
src/components/UniversalPostRenderer.tsx
···
306
306
filterMustBeReply={filterMustBeReply}
307
307
/>
308
308
<>
309
309
-
{maxReplies && maxReplies === 0 && replies && replies > 0 ? (
309
309
+
{maxReplies !== undefined && maxReplies === 0 && replies && replies > 0 ? (
310
310
<>
311
311
<MoreReplies atUri={atUri} />
312
312
</>
313
313
) : (
314
314
-
<></>
314
314
+
<>
315
315
+
</>
315
316
)}
316
317
</>
317
318
{!isQuote && oldestOpsReplyElseNewestNonOpsReply && (
···
354
355
params: { did: aturio.host, rkey: aturio.rkey },
355
356
})
356
357
}
357
357
-
className="border-b border-gray-300 dark:border-gray-800 flex flex-row px-4 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-900 transition-colors"
358
358
+
className="border-b border-gray-200 dark:border-gray-800 flex flex-row px-4 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-900 transition-colors"
358
359
>
359
360
<div className="w-[42px] h-12 flex flex-col items-center justify-center">
360
361
<div
+12
-2
src/routes/profile.$did/post.$rkey.tsx
···
409
409
}
410
410
}, [parentsLoading, mainPost, showMainPostRoute]);
411
411
412
412
+
const directparent = mainPost?.value.reply?.parent.uri;
413
413
+
412
414
React.useEffect(() => {
413
415
if (!mainPost?.value?.reply?.parent?.uri) {
414
416
setParents([]);
···
418
420
let ignore = false;
419
421
const fetchParents = async () => {
420
422
setParentsLoading(true);
421
421
-
const parentChain: any[] = [];
423
423
+
const parentChain: ({uri: string;cid: string;value: any;} | undefined)[] = [];
422
424
let currentParentUri = mainPost?.value.reply?.parent.uri;
423
425
const MAX_PARENTS = 25;
424
426
let safetyCounter = 0;
···
433
435
currentParentUri = parentPost.value?.reply?.parent?.uri;
434
436
} catch (error) {
435
437
console.error("Failed to fetch a parent post:", error);
438
438
+
// its okay to always add one invalid parent then stop
439
439
+
if (currentParentUri){
440
440
+
parentChain.push({
441
441
+
uri: currentParentUri,
442
442
+
cid: "sorry",
443
443
+
value: "sorry",
444
444
+
})
445
445
+
}
436
446
break;
437
447
}
438
448
safetyCounter++;
···
499
509
<UniversalPostRendererATURILoader
500
510
atUri={atUri!}
501
511
detailed={true}
502
502
-
topReplyLine={parentsLoading || parents.length > 0}
512
512
+
topReplyLine={parentsLoading || parents.length > 0 || !!directparent}
503
513
nopics={!!nopics}
504
514
lightboxCallback={lightboxCallback}
505
515
/>