forked from MarseyWorld/MarseyWorld
sounding
parent
bab8fc0340
commit
39254f19eb
|
@ -70,11 +70,6 @@ class Submission(Base):
|
|||
def __repr__(self):
|
||||
return f"<Submission(id={self.id})>"
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def comments2(self):
|
||||
return g.db.query(Comment.author_id, Comment.created_utc, Comment.id).filter(Comment.parent_submission == self.id, Comment.author_id.notin_((AUTOPOLLER_ID,AUTOBETTER_ID, AUTOCHOICE_ID))).all()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def controversial(self):
|
||||
|
|
|
@ -894,9 +894,9 @@
|
|||
lastCount = comments['{{p.id}}']
|
||||
if (lastCount)
|
||||
{
|
||||
{% for c in p.comments2 %}
|
||||
{% if not (v and v.id==c[0]) and not c.voted %}
|
||||
if ({{c[1]*1000}} > lastCount.t)
|
||||
{% for c in p.comments %}
|
||||
{% if not (v and v.id==c.author_id) and not c.voted %}
|
||||
if ({{c.created_utc*1000}} > lastCount.t)
|
||||
try {document.getElementById("comment-{{c.id}}-only").classList.add('unread2')}
|
||||
catch(e) {}
|
||||
{% endif %}
|
||||
|
@ -924,9 +924,9 @@
|
|||
lastCount = comments['{{p.id}}']
|
||||
if (lastCount)
|
||||
{
|
||||
{% for c in p.comments2 %}
|
||||
{% if not (v and v.id==c[0]) and not c.voted %}
|
||||
if ({{c[1]*1000}} > lastCount.t)
|
||||
{% for c in p.comments %}
|
||||
{% if not (v and v.id==c.author_id) and not c.voted %}
|
||||
if ({{c.created_utc*1000}} > lastCount.t)
|
||||
try {document.getElementById("comment-{{c.id}}-only").classList.add('unread2')}
|
||||
catch(e) {}
|
||||
{% endif %}
|
||||
|
|
|
@ -996,9 +996,9 @@
|
|||
lastCount = comments['{{p.id}}']
|
||||
if (lastCount)
|
||||
{
|
||||
{% for c in p.comments2 %}
|
||||
{% if not (v and v.id==c[0]) and not c.voted %}
|
||||
if ({{c[1]*1000}} > lastCount.t)
|
||||
{% for c in p.comments %}
|
||||
{% if not (v and v.id==c.author_id) and not c.voted %}
|
||||
if ({{c.created_utc*1000}} > lastCount.t)
|
||||
try {document.getElementById("comment-{{c.id}}-only").classList.add('unread2')}
|
||||
catch(e) {}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue