Fix thread status updating for the catalog view.
This commit is contained in:
parent
9a1eab3195
commit
444722fb9b
@ -7,8 +7,9 @@ class CatalogThread
|
|||||||
@board = @thread.board
|
@board = @thread.board
|
||||||
@nodes =
|
@nodes =
|
||||||
root: root
|
root: root
|
||||||
thumb: $ '.thumb', root
|
thumb: $ '.thumb', root
|
||||||
postCount: $ '.post-count', root
|
icons: $ '.thread-icons', root
|
||||||
fileCount: $ '.file-count', root
|
postCount: $ '.post-count', root
|
||||||
pageCount: $ '.page-count', root
|
fileCount: $ '.file-count', root
|
||||||
|
pageCount: $ '.page-count', root
|
||||||
@thread.catalogView = @
|
@thread.catalogView = @
|
||||||
|
|||||||
@ -33,7 +33,7 @@ class Thread
|
|||||||
typeLC = type.toLowerCase()
|
typeLC = type.toLowerCase()
|
||||||
unless status
|
unless status
|
||||||
$.rm $ ".#{typeLC}Icon", @OP.nodes.info
|
$.rm $ ".#{typeLC}Icon", @OP.nodes.info
|
||||||
$.rm $ ".#{typeLC}Icon", @catalogView if @catalogView
|
$.rm $ ".#{typeLC}Icon", @catalogView.nodes.icons if @catalogView
|
||||||
return
|
return
|
||||||
|
|
||||||
icon = $.el 'img',
|
icon = $.el 'img',
|
||||||
@ -49,8 +49,7 @@ class Thread
|
|||||||
$.after root, [$.tn(' '), icon]
|
$.after root, [$.tn(' '), icon]
|
||||||
|
|
||||||
return unless @catalogView
|
return unless @catalogView
|
||||||
root = $ '.thread-icons', @catalogView
|
(if type is 'Sticky' and @isClosed then $.prepend else $.add) @catalogView.nodes.icons, icon.cloneNode()
|
||||||
(if type is 'Sticky' and @isClosed then $.prepend else $.add) root, icon.cloneNode()
|
|
||||||
|
|
||||||
pin: ->
|
pin: ->
|
||||||
@isOnTop = @isPinned = true
|
@isOnTop = @isPinned = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user