From 516ef196031c1b2792821b95c2624e0d3ad855aa Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 17 Sep 2023 22:20:26 +0300 Subject: [PATCH] hide bannedfor and chuddedfor icons in chudrama html-side --- files/routes/reporting.py | 4 ---- files/templates/comments.html | 4 ++-- files/templates/util/macros.html | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 7c4129d41..435a2458b 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -190,10 +190,6 @@ def move_post(post, v, reason): post.hole_pinned = None g.db.add(post) - if sub_to == 'chudrama': - post.bannedfor = None - post.chuddedfor = None - if v.id != post.author_id: sub_from_str = 'main feed' if sub_from is None else \ f'/h/{sub_from}' diff --git a/files/templates/comments.html b/files/templates/comments.html index 6fcabd95e..41917049f 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -124,11 +124,11 @@ {% endif %} {% endif %} - {% if c.bannedfor %} + {% if c.bannedfor and not (c.parent_post and c.post.sub == 'chudrama') %} {% endif %} - {% if c.chuddedfor %} + {% if c.chuddedfor and not (c.parent_post and c.post.sub == 'chudrama') %} {% endif %} diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index a7ba0e3ab..276904cf5 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -21,11 +21,11 @@ {% endif %} - {% if p.bannedfor %} + {% if p.bannedfor and not (c.parent_post and c.post.sub == 'chudrama') %} {% endif %} - {% if p.chuddedfor %} + {% if p.chuddedfor and not (c.parent_post and c.post.sub == 'chudrama') %} {% endif %}