Fix thread status updating for the catalog view.

This commit is contained in:
Mayhem 2014-01-31 17:35:28 +01:00
parent 9a1eab3195
commit 444722fb9b
2 changed files with 7 additions and 7 deletions

View File

@ -7,8 +7,9 @@ class CatalogThread
@board = @thread.board
@nodes =
root: root
thumb: $ '.thumb', root
postCount: $ '.post-count', root
fileCount: $ '.file-count', root
pageCount: $ '.page-count', root
thumb: $ '.thumb', root
icons: $ '.thread-icons', root
postCount: $ '.post-count', root
fileCount: $ '.file-count', root
pageCount: $ '.page-count', root
@thread.catalogView = @

View File

@ -33,7 +33,7 @@ class Thread
typeLC = type.toLowerCase()
unless status
$.rm $ ".#{typeLC}Icon", @OP.nodes.info
$.rm $ ".#{typeLC}Icon", @catalogView if @catalogView
$.rm $ ".#{typeLC}Icon", @catalogView.nodes.icons if @catalogView
return
icon = $.el 'img',
@ -49,8 +49,7 @@ class Thread
$.after root, [$.tn(' '), icon]
return unless @catalogView
root = $ '.thread-icons', @catalogView
(if type is 'Sticky' and @isClosed then $.prepend else $.add) root, icon.cloneNode()
(if type is 'Sticky' and @isClosed then $.prepend else $.add) @catalogView.nodes.icons, icon.cloneNode()
pin: ->
@isOnTop = @isPinned = true