From eda9b121c5c1f75be9fcb3d5ffd28786a208427b Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 12 Aug 2017 10:39:16 -0700 Subject: [PATCH] Move reply hiding test into function for reuse. --- src/General/Index.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index b12b82961..2670946c0 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -688,6 +688,9 @@ Index = else 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) -> threads = [] newThreads = [] @@ -788,8 +791,7 @@ Index = replies = [] for data in lastReplies - continue if PostHiding.isHidden(g.BOARD.ID, thread.ID, data.no) - continue if Filter.isHidden(Build.parseJSON data, g.BOARD.ID) + continue if Index.isHiddenReply thread.ID, data reply = Build.catalogReply thread, data RelativeDates.update $('time', reply) $.on $('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover