remotes/1693045480750635534/spooky-22
Aevann1 2022-03-06 03:18:10 +02:00
parent bab8fc0340
commit 39254f19eb
3 changed files with 9 additions and 14 deletions

View File

@ -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):

View File

@ -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 %}

View File

@ -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 %}