Only listen to 'IndexRefresh' events when browsing the index.
This commit is contained in:
parent
72b38da3af
commit
79644546ce
@ -10,9 +10,12 @@ ThreadWatcher =
|
|||||||
@list = @dialog.lastElementChild
|
@list = @dialog.lastElementChild
|
||||||
|
|
||||||
$.on d, 'QRPostSuccessful', @cb.post
|
$.on d, 'QRPostSuccessful', @cb.post
|
||||||
$.on d, 'ThreadUpdate', @cb.threadUpdate if g.VIEW is 'thread'
|
|
||||||
$.on d, '4chanXInitFinished', @ready
|
$.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()
|
now = Date.now()
|
||||||
if (@db.data.lastChecked or 0) < now - 2 * $.HOUR
|
if (@db.data.lastChecked or 0) < now - 2 * $.HOUR
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user