Only show MD5 quick filter notification when using keybind. #2385
This commit is contained in:
parent
46fb24219b
commit
c9ebeabb12
@ -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
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user