fix child comment highlighting

remotes/1693045480750635534/spooky-22
Aevann1 2022-06-28 02:41:25 +02:00
parent bb9d842f81
commit 4fae28a2a2
4 changed files with 5 additions and 4 deletions

View File

@ -75,6 +75,7 @@ class Submission(Base):
approved_by = relationship("User", uselist=False, primaryjoin="Submission.is_approved==User.id", viewonly=True)
awards = relationship("AwardRelationship", order_by="AwardRelationship.awarded_utc.desc()", viewonly=True)
reports = relationship("Flag", viewonly=True)
comments = relationship("Comment", primaryjoin="Comment.parent_submission==Submission.id")
subr = relationship("Sub", primaryjoin="foreign(Submission.sub)==remote(Sub.name)", viewonly=True)
bump_utc = deferred(Column(Integer, server_default=FetchedValue()))

View File

@ -875,7 +875,7 @@
lastCount = comments['{{p.id}}']
if (lastCount)
{
{% for c in p.replies %}
{% 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('unread')}
@ -906,7 +906,7 @@
lastCount = comments['{{p.id}}']
if (lastCount)
{
{% for c in p.replies %}
{% 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('unread')}

View File

@ -1127,7 +1127,7 @@
lastCount = comments['{{p.id}}']
if (lastCount)
{
{% for c in p.replies %}
{% 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('unread')}

View File

@ -94,7 +94,7 @@
lastCount = comments['{{p.id}}']
if (lastCount)
{
{% for c in p.replies %}
{% 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('unread')}