Fix bug with updating thread watcher icon when info is in catalog.

This commit is contained in:
ccd0 2016-09-23 22:21:02 -07:00
parent 2468949823
commit 08c8eb77cc

View File

@ -79,12 +79,12 @@ ThreadWatcher =
node: ->
return if @isReply
if @isClone
toggler = $ '.watch-thread-link', @nodes.post
toggler = $ '.watch-thread-link', @nodes.info
else
toggler = $.el 'a',
href: 'javascript:;'
className: 'watch-thread-link'
$.before $('input', @nodes.post), toggler
$.before $('input', @nodes.info), toggler
boardID = @board.ID
threadID = @thread.ID
data = ThreadWatcher.db.get {boardID, threadID}
@ -333,7 +333,7 @@ ThreadWatcher =
isWatched = ThreadWatcher.isWatched thread
if thread.OP
for post in [thread.OP, thread.OP.clones...]
toggler = $ '.watch-thread-link', post.nodes.post
toggler = $ '.watch-thread-link', post.nodes.info
ThreadWatcher.setToggler toggler, isWatched
thread.catalogView.nodes.root.classList.toggle 'watched', isWatched if thread.catalogView