Fix thread hiding init.

This commit is contained in:
Nicolas Stepien 2013-03-29 13:35:05 +01:00
parent 1b5695ac82
commit 64b5da652f

View File

@ -1049,7 +1049,6 @@ ThreadHiding =
return if g.VIEW isnt 'index' or !Conf['Thread Hiding'] and !Conf['Thread Hiding Link'] return if g.VIEW isnt 'index' or !Conf['Thread Hiding'] and !Conf['Thread Hiding Link']
Misc.clearThreads "hiddenThreads.#{g.BOARD}" Misc.clearThreads "hiddenThreads.#{g.BOARD}"
@getHiddenThreads()
@syncFromCatalog() @syncFromCatalog()
Thread::callbacks.push Thread::callbacks.push
name: 'Thread Hiding' name: 'Thread Hiding'
@ -1068,8 +1067,9 @@ ThreadHiding =
syncFromCatalog: -> syncFromCatalog: ->
# Sync hidden threads from the catalog into the index. # Sync hidden threads from the catalog into the index.
ThreadHiding.getHiddenThreads (hiddenThreads) ->
{threads} = hiddenThreads
hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem "4chan-hide-t-#{g.BOARD}") or {} hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem "4chan-hide-t-#{g.BOARD}") or {}
{threads} = ThreadHiding.hiddenThreads
# Add threads that were hidden in the catalog. # Add threads that were hidden in the catalog.
for threadID of hiddenThreadsOnCatalog for threadID of hiddenThreadsOnCatalog