Also add replies-unread to icon when appropriate (no highlighting by default).
This commit is contained in:
parent
9737cb47d5
commit
2ff364defe
@ -276,6 +276,7 @@ ThreadWatcher =
|
|||||||
$.addClass div, 'replies-quoting-you' if data.quotingYou
|
$.addClass div, 'replies-quoting-you' if data.quotingYou
|
||||||
$.add div, [x, $.tn(' '), link]
|
$.add div, [x, $.tn(' '), link]
|
||||||
div
|
div
|
||||||
|
|
||||||
refresh: ->
|
refresh: ->
|
||||||
nodes = []
|
nodes = []
|
||||||
for {boardID, threadID, data} in ThreadWatcher.getAll()
|
for {boardID, threadID, data} in ThreadWatcher.getAll()
|
||||||
@ -294,7 +295,7 @@ ThreadWatcher =
|
|||||||
toggler.title = "#{helper[1]} Thread"
|
toggler.title = "#{helper[1]} Thread"
|
||||||
$[helper[0]] thread.catalogView.nodes.root, 'watched' if thread.catalogView
|
$[helper[0]] thread.catalogView.nodes.root, 'watched' if thread.catalogView
|
||||||
|
|
||||||
ThreadWatcher.shortcut.classList.toggle 'replies-quoting-you', !!$('.replies-quoting-you', ThreadWatcher.dialog)
|
ThreadWatcher.refreshIcon()
|
||||||
|
|
||||||
for refresher in ThreadWatcher.menu.refreshers
|
for refresher in ThreadWatcher.menu.refreshers
|
||||||
refresher()
|
refresher()
|
||||||
@ -303,6 +304,11 @@ ThreadWatcher =
|
|||||||
Index.sort()
|
Index.sort()
|
||||||
Index.buildIndex()
|
Index.buildIndex()
|
||||||
|
|
||||||
|
refreshIcon: ->
|
||||||
|
for className in ['replies-unread', 'replies-quoting-you']
|
||||||
|
ThreadWatcher.shortcut.classList.toggle className, !!$(".#{className}", ThreadWatcher.dialog)
|
||||||
|
return
|
||||||
|
|
||||||
update: (boardID, threadID, newData) ->
|
update: (boardID, threadID, newData) ->
|
||||||
return unless data = ThreadWatcher.db?.get {boardID, threadID}
|
return unless data = ThreadWatcher.db?.get {boardID, threadID}
|
||||||
if newData.isDead and Conf['Auto Prune']
|
if newData.isDead and Conf['Auto Prune']
|
||||||
@ -319,7 +325,7 @@ ThreadWatcher =
|
|||||||
if line = $ "#watched-threads > [data-full-i-d='#{boardID}.#{threadID}']", ThreadWatcher.dialog
|
if line = $ "#watched-threads > [data-full-i-d='#{boardID}.#{threadID}']", ThreadWatcher.dialog
|
||||||
newLine = ThreadWatcher.makeLine boardID, threadID, data
|
newLine = ThreadWatcher.makeLine boardID, threadID, data
|
||||||
$.replace line, newLine
|
$.replace line, newLine
|
||||||
ThreadWatcher.shortcut.classList.toggle 'replies-quoting-you', !!$('.replies-quoting-you', ThreadWatcher.dialog)
|
ThreadWatcher.refreshIcon()
|
||||||
else
|
else
|
||||||
ThreadWatcher.refresh()
|
ThreadWatcher.refresh()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user