Merge branch 'indexrefresh'

This commit is contained in:
ccd0 2016-09-27 21:00:02 -07:00
commit 76d31e5408
5 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,7 @@ ThreadHiding =
@db = new DataBoard 'hiddenThreads'
return @catalogWatch() if g.VIEW is 'catalog'
@catalogSet g.BOARD
$.on d, 'IndexRefresh', @onIndexRefresh
$.on d, 'IndexRefreshInternal', @onIndexRefresh
Callbacks.Post.push
name: 'Thread Hiding'
cb: @node

View File

@ -126,7 +126,7 @@ Index =
$.replace board, Index.root
if Index.nodes
$.event 'PostsInserted'
$.event 'IndexBuild'
$.event 'IndexRefresh'
# Hacks:
# - When removing an element from the document during page load,
# its ancestors will still be correctly created inside of it.
@ -616,7 +616,7 @@ Index =
Main.callbackNodes 'Thread', threads
Main.callbackNodes 'Post', posts
Index.updateHideLabel()
$.event 'IndexRefresh'
$.event 'IndexRefreshInternal'
buildReplies: (threads) ->
posts = []
@ -773,7 +773,7 @@ Index =
$.add Index.root, nodes
if doc.contains Index.root
$.event 'PostsInserted'
$.event 'IndexBuild'
$.event 'IndexRefresh'
buildCatalog: (threads) ->
Index.buildCatalogViews threads
@ -791,7 +791,7 @@ Index =
$.add Index.root, nodes
if doc.contains Index.root
$.event 'PostsInserted'
$.event 'IndexBuild'
$.event 'IndexRefresh'
clearSearch: ->
Index.searchInput.value = ''

View File

@ -3,7 +3,7 @@ ExpandThread =
init: ->
return if g.VIEW is 'thread' or !Conf['Thread Expansion']
if Conf['JSON Index']
$.on d, 'IndexRefresh', @onIndexRefresh
$.on d, 'IndexRefreshInternal', @onIndexRefresh
else
Callbacks.Thread.push
name: 'Expand Thread'
@ -21,7 +21,7 @@ ExpandThread =
status.req?.abort()
delete ExpandThread.statuses[threadID]
$.off d, 'IndexRefresh', @onIndexRefresh unless refresh
$.off d, 'IndexRefreshInternal', @onIndexRefresh unless refresh
onIndexRefresh: ->
ExpandThread.disconnect true

View File

@ -28,7 +28,7 @@ ThreadWatcher =
switch g.VIEW
when 'index'
$.on d, 'IndexRefresh', @cb.onIndexRefresh
$.on d, 'IndexRefreshInternal', @cb.onIndexRefresh
when 'thread'
$.on d, 'ThreadUpdate', @cb.onThreadRefresh

View File

@ -105,7 +105,7 @@ QR =
$.on d, 'drop', QR.dropFile
$.on d, 'dragstart dragend', QR.drag
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
$.on d, 'IndexRefreshInternal', QR.generatePostableThreadsList
$.on d, 'ThreadUpdate', QR.statusCheck
return if !Conf['Persistent QR']