Only listen to 'IndexRefresh' events when browsing the index.

This commit is contained in:
Mayhem 2013-10-31 04:16:47 +01:00
parent 72b38da3af
commit 79644546ce

View File

@ -10,9 +10,12 @@ ThreadWatcher =
@list = @dialog.lastElementChild
$.on d, 'QRPostSuccessful', @cb.post
$.on d, 'ThreadUpdate', @cb.threadUpdate if g.VIEW is 'thread'
$.on d, '4chanXInitFinished', @ready
$.on d, 'IndexRefresh', @refresh
switch g.VIEW
when 'index'
$.on d, 'IndexRefresh', @refresh
when 'thread'
$.on d, 'ThreadUpdate', @cb.threadUpdate
now = Date.now()
if (@db.data.lastChecked or 0) < now - 2 * $.HOUR