forked from rDrama/rDrama
do this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/4740259#context
parent
a315aa6a47
commit
b99bc05bb3
|
@ -64,16 +64,21 @@ def post_pid_comment_cid(cid, v, pid=None, anything=None, sub=None):
|
||||||
except: context = 8
|
except: context = 8
|
||||||
comment_info = comment
|
comment_info = comment
|
||||||
c = comment
|
c = comment
|
||||||
while context and c.level > 1:
|
|
||||||
c = c.parent_comment
|
|
||||||
context -= 1
|
|
||||||
top_comment = c
|
|
||||||
|
|
||||||
if post.new: defaultsortingcomments = 'new'
|
if post.new: defaultsortingcomments = 'new'
|
||||||
elif v: defaultsortingcomments = v.defaultsortingcomments
|
elif v: defaultsortingcomments = v.defaultsortingcomments
|
||||||
else: defaultsortingcomments = "hot"
|
else: defaultsortingcomments = "hot"
|
||||||
sort=request.values.get("sort", defaultsortingcomments)
|
sort=request.values.get("sort", defaultsortingcomments)
|
||||||
|
|
||||||
|
while context and c.level > 1:
|
||||||
|
parent = c.parent_comment
|
||||||
|
replies = parent.replies(sort)
|
||||||
|
replies.remove(c)
|
||||||
|
parent.replies2 = [c] + replies
|
||||||
|
c = parent
|
||||||
|
context -= 1
|
||||||
|
top_comment = c
|
||||||
|
|
||||||
if v:
|
if v:
|
||||||
# this is required because otherwise the vote and block
|
# this is required because otherwise the vote and block
|
||||||
# props won't save properly unless you put them in a list
|
# props won't save properly unless you put them in a list
|
||||||
|
|
Loading…
Reference in New Issue