fds
This commit is contained in:
parent
d1ce237f19
commit
fbbfc65315
3 changed files with 9 additions and 4 deletions
|
@ -66,6 +66,11 @@ class Submission(Base):
|
|||
def __repr__(self):
|
||||
return f"<Submission(id={self.id})>"
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def comments(self):
|
||||
return g.db.query(Comment.author_id, Comment.created_utc, Comment.id).filter_by(parent_submission=self.id)
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def controversial(self):
|
||||
|
|
|
@ -559,7 +559,7 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def applications(self):
|
||||
return g.db.query(OauthApp).filter_by(author_id=self.id).order_by(OauthApp.id.asc()).all()
|
||||
return g.db.query(OauthApp).filter_by(author_id=self.id).order_by(OauthApp.id)
|
||||
|
||||
@lazy
|
||||
def subscribed_idlist(self, page=1):
|
||||
|
|
|
@ -861,9 +861,9 @@
|
|||
redhtml = '<i style="color:red !important" class="text-admin fas fa-circle" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Unread"></i>'
|
||||
if (lastCount)
|
||||
{
|
||||
{% for c in comments %}
|
||||
{% if not (v and v.id==c.author_id) %}
|
||||
if ({{c.created_utc*1000}} > lastCount.t) document.getElementById("reddot-{{c.id}}").innerHTML = redhtml
|
||||
{% for c in p.comments %}
|
||||
{% if not (v and v.id==c[0]) %}
|
||||
if ({{c[1]*1000}} > lastCount.t) document.getElementById("reddot-{{c[2]}}").innerHTML = redhtml
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue