Only show MD5 quick filter notification when using keybind. #2385

This commit is contained in:
ccd0 2019-08-04 20:27:05 -07:00
parent 46fb24219b
commit c9ebeabb12
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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'