Add keybind to mark thread read from index (if Unread Line in Index enabled).

This commit is contained in:
ccd0 2018-11-01 23:17:06 -07:00
parent b79ef7131a
commit c66529d4c5
3 changed files with 8 additions and 0 deletions

View File

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

View File

@ -6,6 +6,7 @@ UnreadIndex =
init: -> init: ->
return unless g.VIEW is 'index' and Conf['Remember Last Read Post'] and Conf['Unread Line in Index'] return unless g.VIEW is 'index' and Conf['Remember Last Read Post'] and Conf['Unread Line in Index']
@enabled = true
@db = new DataBoard 'lastReadPosts', @sync @db = new DataBoard 'lastReadPosts', @sync
Callbacks.Thread.push Callbacks.Thread.push

View File

@ -947,6 +947,10 @@ Config =
't' 't'
'Toggle visibility of thread watcher.' 'Toggle visibility of thread watcher.'
] ]
'Mark thread read': [
'Ctrl+0'
'Mark thread read from index (requires "Unread Line in Index").'
]
# Images # Images
'Expand image': [ 'Expand image': [
'Shift+e' 'Shift+e'