From 57d2bf5e72a6adbc5fa3096093866c8973cbe09a Mon Sep 17 00:00:00 2001 From: James Xylight Date: Fri, 5 Sep 2025 16:32:23 -0700 Subject: [PATCH] fix: show more context by default --- src/routes/comment/[instance]/[id]/+page.ts | 5 +---- src/routes/post/[instance]/[id=integer]/+page.ts | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/routes/comment/[instance]/[id]/+page.ts b/src/routes/comment/[instance]/[id]/+page.ts index 43624d65..79eabbe2 100644 --- a/src/routes/comment/[instance]/[id]/+page.ts +++ b/src/routes/comment/[instance]/[id]/+page.ts @@ -16,10 +16,7 @@ export async function load({ params, fetch }) { const split = comment.comment_view.comment.path.split('.') - const threadPath = - split.length > 4 - ? comment.comment_view.comment.id - : split.slice(-5).join('.') + const threadPath = split.slice(-5).join('.') redirect( 302, diff --git a/src/routes/post/[instance]/[id=integer]/+page.ts b/src/routes/post/[instance]/[id=integer]/+page.ts index 7ca9b91b..bec05fd0 100644 --- a/src/routes/post/[instance]/[id=integer]/+page.ts +++ b/src/routes/post/[instance]/[id=integer]/+page.ts @@ -26,7 +26,7 @@ interface PartialPost { function buildContext(thread?: string) { let parentId: number | undefined let showContext: boolean = false - const max_depth = 3 + let max_depth = 3 if (thread) { const split = thread.split('.') @@ -35,6 +35,7 @@ function buildContext(thread?: string) { else { parentId = Number(thread.split('.')[0]) showContext = true + max_depth = 5 } }