Only run filters on thread watcher replies quoting you.
This commit is contained in:
parent
273a164ac2
commit
44a2dfe737
@ -214,10 +214,12 @@ ThreadWatcher =
|
|||||||
for postObj in @response.posts
|
for postObj in @response.posts
|
||||||
continue unless postObj.no > lastReadPost
|
continue unless postObj.no > lastReadPost
|
||||||
continue if QR.db?.get {boardID, threadID, postID: postObj.no}
|
continue if QR.db?.get {boardID, threadID, postID: postObj.no}
|
||||||
continue if Filter.isHidden(Build.parseJSON postObj, boardID)
|
|
||||||
|
|
||||||
unread++
|
unread++
|
||||||
|
|
||||||
continue unless QR.db and postObj.com
|
continue unless QR.db and postObj.com
|
||||||
|
|
||||||
|
quotesYou = false
|
||||||
regexp = /<a [^>]*\bhref="(?:\/([^\/]+)\/thread\/(\d+))?(?:#p(\d+))?"/g
|
regexp = /<a [^>]*\bhref="(?:\/([^\/]+)\/thread\/(\d+))?(?:#p(\d+))?"/g
|
||||||
while match = regexp.exec postObj.com
|
while match = regexp.exec postObj.com
|
||||||
if QR.db.get {
|
if QR.db.get {
|
||||||
@ -225,8 +227,10 @@ ThreadWatcher =
|
|||||||
threadID: match[2] or threadID
|
threadID: match[2] or threadID
|
||||||
postID: match[3] or match[2] or threadID
|
postID: match[3] or match[2] or threadID
|
||||||
}
|
}
|
||||||
|
quotesYou = true
|
||||||
|
break
|
||||||
|
if quotesYou and not Filter.isHidden(Build.parseJSON postObj, boardID)
|
||||||
quotingYou++
|
quotingYou++
|
||||||
continue
|
|
||||||
|
|
||||||
if isDead isnt data.isDead or unread isnt data.unread or quotingYou isnt data.quotingYou
|
if isDead isnt data.isDead or unread isnt data.unread or quotingYou isnt data.quotingYou
|
||||||
data.isDead = isDead
|
data.isDead = isDead
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user