add reder_event max depth in reply modal
so it doesn't get too large
This commit is contained in:
parent
c2cd952697
commit
20a0be4943
1 changed files with 5 additions and 3 deletions
|
@ -542,8 +542,10 @@ function render_event(model, ev, opts={}) {
|
||||||
if (reply_ev) {
|
if (reply_ev) {
|
||||||
opts.replies = opts.replies == null ? 1 : opts.replies + 1
|
opts.replies = opts.replies == null ? 1 : opts.replies + 1
|
||||||
opts.is_reply = true
|
opts.is_reply = true
|
||||||
replying_to = render_event(model, reply_ev, opts)
|
if (opts.max_depth == null || opts.replies < opts.max_depth) {
|
||||||
reply_line_top = render_reply_line_top()
|
replying_to = render_event(model, reply_ev, opts)
|
||||||
|
reply_line_top = render_reply_line_top()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -781,7 +783,7 @@ function reply_to(evid) {
|
||||||
|
|
||||||
replying_to.dataset.evid = evid
|
replying_to.dataset.evid = evid
|
||||||
const ev = DSTATE.all_events[evid]
|
const ev = DSTATE.all_events[evid]
|
||||||
replying_to.innerHTML = render_event(DSTATE, ev, {is_composing: true, nobar: true})
|
replying_to.innerHTML = render_event(DSTATE, ev, {is_composing: true, nobar: true, max_depth: 2})
|
||||||
|
|
||||||
modal.style.display = replying? "block" : "none";
|
modal.style.display = replying? "block" : "none";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue