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