Remove hot posts button from mobile interface (#38)

This commit also cleans up some remnants of the previous default sort
orders.
This commit is contained in:
iro84657 2022-05-09 00:21:43 -04:00 committed by GitHub
parent 728260e4ad
commit 0bab69947a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 19 deletions

View file

@ -129,9 +129,8 @@ 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 'megathread' in post.title.lower(): defaultsortingcomments = 'new'
elif v: defaultsortingcomments = v.defaultsortingcomments
else: defaultsortingcomments = "top"
if v: defaultsortingcomments = v.defaultsortingcomments
else: defaultsortingcomments = "new"
sort = request.values.get("sort", defaultsortingcomments)
if post.club and not (v and (v.paid_dues or v.id == post.author_id)): abort(403)