From 724ef551fd7ed5699f00a7f98e02835205e10302 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 3 Apr 2022 20:12:37 +0200 Subject: [PATCH] dgf --- files/classes/user.py | 9 +++++++-- files/templates/header.html | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index ec70a40ed..b4214b5c1 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -425,8 +425,13 @@ class User(Base): @property @lazy - def not_post_notifications_count(self): - return self.notifications_count - self.post_notifications_count - self.reddit_notifications_count + def do_posts(self): + return self.post_notifications_count and self.notifications_count-self.reddit_notifications_count == self.post_notifications_count + + @property + @lazy + def do_reddit(self): + return self.notifications_count == self.reddit_notifications_count @property @lazy diff --git a/files/templates/header.html b/files/templates/header.html index f43d549dd..b8ede4f25 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -58,7 +58,7 @@ {% if v %} {% if v.notifications_count %} - {{v.notifications_count}} + {{v.notifications_count}} {% else %} {% endif %} @@ -102,7 +102,7 @@ {% if v.notifications_count %} {% else %}