fsd
This commit is contained in:
parent
422e7ee044
commit
0bf2190404
2 changed files with 6 additions and 1 deletions
|
@ -435,6 +435,11 @@ class User(Base):
|
|||
def reddit_notifications_count(self):
|
||||
return g.db.query(Notification.user_id).join(Comment).filter(Notification.user_id == self.id, Notification.read == False, Comment.is_banned == False, Comment.deleted_utc == 0, Comment.body_html.like('<html><body><p>New rdrama mention: <a href="https://old.reddit.com/r/%')).count()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def normal_count(self):
|
||||
return notifications_count - post_notifications_count - reddit_notifications_count
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def do_posts(self):
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<ul class="nav settings-nav" style="padding:0 0 0 20px">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link py-3{% if not '=true' in request.full_path %} active{% endif %}" href="/notifications">
|
||||
All {% if v.not_post_notifications_count %} <span class="font-weight-bold" style="color:red">({{v.not_post_notifications_count}})</span>{% endif %}
|
||||
All {% if v.normal_count %} <span class="font-weight-bold" style="color:red">({{v.normal_count}})</span>{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue