Quote threading hotkey

This commit is contained in:
Teasday 2019-04-04 17:43:31 +03:00
parent cc02b152ff
commit af42c636b4
3 changed files with 17 additions and 1 deletions

View File

@ -109,6 +109,9 @@ Keybinds =
when Conf['Toggle thread watcher']
return unless ThreadWatcher.enabled
ThreadWatcher.toggleWatcher()
when Conf['Toggle threading']
return unless QuoteThreading.ready
QuoteThreading.toggleThreading()
when Conf['Mark thread read']
return unless g.VIEW is 'index' and thread and UnreadIndex.enabled
UnreadIndex.markRead.call threadRoot

View File

@ -38,6 +38,15 @@ QuoteThreading =
children: {}
inserted: {}
toggleThreading: ->
@setThreadingState !Conf['Thread Quotes']
setThreadingState: (enabled) ->
Conf['Thread Quotes'] = enabled
@input.checked = enabled
@setEnabled.call @input
@rethread.call @input
setEnabled: ->
if @checked
$.set 'Prune All Threads', false

View File

@ -632,7 +632,7 @@ Config =
false
'Advance to next post when contracting an expanded image.'
]
gallery:
'Hide Thumbnails': [
false
@ -959,6 +959,10 @@ Config =
't'
'Toggle visibility of thread watcher.'
]
'Toggle threading': [
'Shift+t'
'Toggle threading.'
]
'Mark thread read': [
'Ctrl+0'
'Mark thread read from index (requires "Unread Line in Index").'