From c9ebeabb12dba1bf96544e506496e9c7ddb52f6f Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 4 Aug 2019 20:27:05 -0700 Subject: [PATCH] Only show MD5 quick filter notification when using keybind. #2385 --- src/Filtering/Filter.coffee | 9 ++++++++- src/Miscellaneous/Keybinds.coffee | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Filtering/Filter.coffee b/src/Filtering/Filter.coffee index 5b2d47d2d..75a0f3d91 100644 --- a/src/Filtering/Filter.coffee +++ b/src/Filtering/Filter.coffee @@ -266,7 +266,7 @@ Filter = ta.setSelectionRange tl, tl ta.focus() - quickFilterMD5: -> + quickFilterMD5: (e) -> post = Get.postFromNode @ files = post.files.filter((f) -> f.MD5) return unless files.length @@ -277,6 +277,13 @@ Filter = PostHiding.hide origin else if g.VIEW is 'index' ThreadHiding.hide origin.thread + + unless e.type is 'keydown' + # feedback for when nothing gets hidden + if post.nodes.post.getBoundingClientRect().height + new Notice 'info', 'MD5 filtered.', 2 + return + {notice} = Filter.quickFilterMD5 if notice notice.filters.push filter diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index b51e12304..3768d365e 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -211,7 +211,7 @@ Keybinds = return unless threadRoot post = Keybinds.post threadRoot Keybinds.hl +1, threadRoot - Filter.quickFilterMD5.call post + Filter.quickFilterMD5.call post, e when Conf['Previous Post Quoting You'] return unless threadRoot and QuoteYou.db QuoteYou.cb.seek 'preceding'