From 33d281cc2e3b1038284a1cfd0e498f5f511349bb Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 26 Jun 2023 13:55:38 +0300 Subject: [PATCH] remove poor mode --- files/classes/comment.py | 1 - files/classes/post.py | 2 -- files/classes/user.py | 2 +- files/routes/settings.py | 4 ---- files/routes/wrappers.py | 1 - files/templates/events/DKD/music.html | 2 +- files/templates/events/fistmas/music.html | 2 +- files/templates/modals/emoji.html | 2 +- files/templates/settings/advanced.html | 25 ----------------------- 9 files changed, 4 insertions(+), 37 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 8c0570f09..367d5216c 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -256,7 +256,6 @@ class Comment(Base): @lazy def award_count(self, kind, v): - if v and v.poor and kind.islower(): return 0 num = len([x for x in self.awards if x.kind == kind]) if kind == 'tilt' and num > 4: return 4 return num diff --git a/files/classes/post.py b/files/classes/post.py index 6d3f167ee..b02c05971 100644 --- a/files/classes/post.py +++ b/files/classes/post.py @@ -246,8 +246,6 @@ class Post(Base): def award_count(self, kind, v): if SITE_NAME == 'WPD' and not v and kind in {'confetti', 'fireworks'} and self.sub not in {'meta', 'discussion', 'social', 'music'}: return 0 - elif v and v.poor: - return 0 elif self.distinguish_level: if SITE_NAME == 'rDrama' and kind in {'glowie', 'tilt',}: return 0 diff --git a/files/classes/user.py b/files/classes/user.py index e1e8e86d7..af6bd95d4 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -1157,7 +1157,7 @@ class User(Base): if not self.patron and SITE_NAME != 'WPD': return False - if v and (v.sigs_disabled or v.poor): + if v and v.sigs_disabled: return False return True diff --git a/files/routes/settings.py b/files/routes/settings.py index 5de021388..5e1455506 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -167,10 +167,6 @@ def settings_personal_post(v): if reddit in {'old.reddit.com', 'reddit.com', 'i.reddit.com', 'reddit.lol', 'libredd.it', 'unddit.com'}: updated = True v.reddit = reddit - elif request.values.get("poor", v.poor) != v.poor: - updated = True - v.poor = request.values.get("poor", v.poor) == 'true' - session['poor'] = v.poor slur_filter_updated = updated or update_potentially_permanent_flag("slurreplacer", "slurreplacer", "slur replacer", 192) if isinstance(slur_filter_updated, bool): diff --git a/files/routes/wrappers.py b/files/routes/wrappers.py index 614d21330..3c139ec16 100644 --- a/files/routes/wrappers.py +++ b/files/routes/wrappers.py @@ -63,7 +63,6 @@ def get_logged_in_user(): g.v = v if v: - v.poor = session.get('poor') # Check against last_active + ACTIVE_TIME to reduce frequency of # UPDATEs in exchange for a ±ACTIVE_TIME margin of error. diff --git a/files/templates/events/DKD/music.html b/files/templates/events/DKD/music.html index e4966a563..b397dfc60 100644 --- a/files/templates/events/DKD/music.html +++ b/files/templates/events/DKD/music.html @@ -1,4 +1,4 @@ -{% if not (v and v.poor) and not (sub and sub.name == 'music') %} +{% if not (sub and sub.name == 'music') %} {% if not song %} {% set path = "assets/events/DKD/music" %} {% set song = "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?x=2' %} diff --git a/files/templates/events/fistmas/music.html b/files/templates/events/fistmas/music.html index 4b6fcc95d..8e1739b21 100644 --- a/files/templates/events/fistmas/music.html +++ b/files/templates/events/fistmas/music.html @@ -1,4 +1,4 @@ -{% if not (SITE_NAME == 'WPD' and not v) and not (v and v.poor) and (not v or v.event_music) and not (sub and sub.name == 'music') %} +{% if not (SITE_NAME == 'WPD' and not v) and (not v or v.event_music) and not (sub and sub.name == 'music') %} {% if not song %} {% set path = "assets/events/fistmas/music" %} {% set song = "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?x=2' %} diff --git a/files/templates/modals/emoji.html b/files/templates/modals/emoji.html index 832e5f42e..dc226ffe4 100644 --- a/files/templates/modals/emoji.html +++ b/files/templates/modals/emoji.html @@ -16,7 +16,7 @@
- +
diff --git a/files/templates/settings/advanced.html b/files/templates/settings/advanced.html index c90fc1bb4..c99e3692c 100644 --- a/files/templates/settings/advanced.html +++ b/files/templates/settings/advanced.html @@ -5,31 +5,6 @@
{# toggle_section(title, id, name, flag, below_text) #} -
{# note: not using the thing from common just because of how much stuff there is in here #} -
Poor Mode
-
-
-
- -
-
-
- - -
- Makes the site faster for low-end devices: -
    -
  • Disables the effects of cosmetic awards.
  • -
  • Hides signatures.
  • -
  • Makes emoji search only start when you press Enter.
  • - {% if SITE_NAME == 'rDrama' %} -
  • Disables event music.
  • - {% endif %} -
-
-
-
-
Sorting and Filtering