Move reply hiding test into function for reuse.
This commit is contained in:
parent
e02e5a4f2d
commit
eda9b121c5
@ -688,6 +688,9 @@ Index =
|
|||||||
else
|
else
|
||||||
Index.parsedThreads[threadID].isHidden
|
Index.parsedThreads[threadID].isHidden
|
||||||
|
|
||||||
|
isHiddenReply: (threadID, replyData) ->
|
||||||
|
PostHiding.isHidden(g.BOARD.ID, threadID, replyData.no) or Filter.isHidden(Build.parseJSON replyData, g.BOARD.ID)
|
||||||
|
|
||||||
buildThreads: (threadIDs, isCatalog) ->
|
buildThreads: (threadIDs, isCatalog) ->
|
||||||
threads = []
|
threads = []
|
||||||
newThreads = []
|
newThreads = []
|
||||||
@ -788,8 +791,7 @@ Index =
|
|||||||
|
|
||||||
replies = []
|
replies = []
|
||||||
for data in lastReplies
|
for data in lastReplies
|
||||||
continue if PostHiding.isHidden(g.BOARD.ID, thread.ID, data.no)
|
continue if Index.isHiddenReply thread.ID, data
|
||||||
continue if Filter.isHidden(Build.parseJSON data, g.BOARD.ID)
|
|
||||||
reply = Build.catalogReply thread, data
|
reply = Build.catalogReply thread, data
|
||||||
RelativeDates.update $('time', reply)
|
RelativeDates.update $('time', reply)
|
||||||
$.on $('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover
|
$.on $('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user