forked from MarseyWorld/MarseyWorld
Remove new sort on 'thread' in Submission.title.
Requested by multiple jannies. Rough timeline, as I understand it:
- Circa 7mo ago, this logic was originally added for threads with
'megathread' in the title.
- Some time later, a checkbox on submission which sets the flag
Submission.new does the same thing.
- In af680d8a94
, change the check from 'megathread' to 'thread'.
There must've been some reason for the change of substring checked.
However, it routinely causes issues for the admins and confuses
users. Solution has been to retroactively update posts that currently
rely on the 'megathread' in title behavior to use the `new` flag and
to remove the logic going forward.
master
parent
f1003b873d
commit
8c50047f20
|
@ -124,7 +124,7 @@ def post_id(pid, anything=None, v=None, sub=None):
|
|||
if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error":"Must be 18+ to view"}, 451
|
||||
return render_template("errors/nsfw.html", v=v)
|
||||
|
||||
if post.new or 'thread' in post.title.lower(): defaultsortingcomments = 'new'
|
||||
if post.new: defaultsortingcomments = 'new'
|
||||
elif v: defaultsortingcomments = v.defaultsortingcomments
|
||||
else: defaultsortingcomments = "top"
|
||||
sort = request.values.get("sort", defaultsortingcomments)
|
||||
|
@ -1071,7 +1071,7 @@ def submit_post(v, sub=None):
|
|||
if request.headers.get("Authorization"): return post.json
|
||||
else:
|
||||
post.voted = 1
|
||||
if post.new or 'thread' in post.title.lower(): sort = 'new'
|
||||
if post.new: sort = 'new'
|
||||
else: sort = v.defaultsortingcomments
|
||||
return render_template('submission.html', v=v, p=post, sort=sort, render_replies=True, offset=0, success=True, sub=post.subr)
|
||||
|
||||
|
|
Loading…
Reference in New Issue