fix: show more context by default
This commit is contained in:
2 files changed
+3
-5
No files matched your search
@@ -16,10 +16,7 @@ export async function load({ params, fetch }) {
|
|||||||
|
|
||||||
const split = comment.comment_view.comment.path.split('.')
|
const split = comment.comment_view.comment.path.split('.')
|
||||||
|
|
||||||
const threadPath =
|
const threadPath = split.slice(-5).join('.')
|
||||||
split.length > 4
|
|
||||||
? comment.comment_view.comment.id
|
|
||||||
: split.slice(-5).join('.')
|
|
||||||
|
|
||||||
redirect(
|
redirect(
|
||||||
302,
|
302,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ interface PartialPost {
|
|||||||
function buildContext(thread?: string) {
|
function buildContext(thread?: string) {
|
||||||
let parentId: number | undefined
|
let parentId: number | undefined
|
||||||
let showContext: boolean = false
|
let showContext: boolean = false
|
||||||
const max_depth = 3
|
let max_depth = 3
|
||||||
|
|
||||||
if (thread) {
|
if (thread) {
|
||||||
const split = thread.split('.')
|
const split = thread.split('.')
|
||||||
@@ -35,6 +35,7 @@ function buildContext(thread?: string) {
|
|||||||
else {
|
else {
|
||||||
parentId = Number(thread.split('.')[0])
|
parentId = Number(thread.split('.')[0])
|
||||||
showContext = true
|
showContext = true
|
||||||
|
max_depth = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user