fix Thread Stats bug

This commit is contained in:
ccd0 2014-04-12 19:34:00 -07:00
parent 8812d4b326
commit 1a3f1f5af2

View File

@ -40,7 +40,7 @@ ThreadStats =
if Conf['Updater and Stats in Header']
Header.rmShortcut @dialog
else
$.rm d.body, sc
$.rm @dialog
clearTimeout @timeout # a possible race condition might be that this won't clear in time, but the resulting error will prevent issues anyways.
@ -49,6 +49,7 @@ ThreadStats =
delete @postCountEl
delete @fileCountEl
delete @pageCountEl
delete @dialog
Thread.callbacks.disconnect 'Thread Stats'
$.off d, 'ThreadUpdate', ThreadStats.onUpdate
@ -81,4 +82,4 @@ ThreadStats =
for thread in page.threads when thread.no is ThreadStats.thread.ID
ThreadStats.pageCountEl.textContent = page.page
(if page.page is @response.length - 1 then $.addClass else $.rmClass) ThreadStats.pageCountEl, 'warning'
return
return