Fix thread updater not thread updating on successful post.

This commit is contained in:
Nicolas Stepien 2013-02-14 21:49:47 +01:00
parent 0ffebeca0b
commit 7bdeabedd8
2 changed files with 7 additions and 7 deletions

View File

@ -3865,12 +3865,12 @@
return ThreadUpdater.cb.autoUpdate(); return ThreadUpdater.cb.autoUpdate();
}, },
post: function(e) { post: function(e) {
if (!(Conf['Auto Update This'] && +e.detail.threadID === this.thread.ID)) { if (!(Conf['Auto Update This'] && +e.detail.threadID === ThreadUpdater.thread.ID)) {
return; return;
} }
this.outdateCount = 0; ThreadUpdater.outdateCount = 0;
if (this.seconds > 2) { if (ThreadUpdater.seconds > 2) {
return setTimeout(this.update.bind(this), 1000); return setTimeout(ThreadUpdater.update, 1000);
} }
}, },
visibility: function() { visibility: function() {

View File

@ -2383,9 +2383,9 @@ ThreadUpdater =
ThreadUpdater.set 'status', 'Offline', 'warning' ThreadUpdater.set 'status', 'Offline', 'warning'
ThreadUpdater.cb.autoUpdate() ThreadUpdater.cb.autoUpdate()
post: (e) -> post: (e) ->
return unless Conf['Auto Update This'] and +e.detail.threadID is @thread.ID return unless Conf['Auto Update This'] and +e.detail.threadID is ThreadUpdater.thread.ID
@outdateCount = 0 ThreadUpdater.outdateCount = 0
setTimeout @update.bind(@), 1000 if @seconds > 2 setTimeout ThreadUpdater.update, 1000 if ThreadUpdater.seconds > 2
visibility: -> visibility: ->
return if $.hidden() return if $.hidden()
# Reset the counter when we focus this tab. # Reset the counter when we focus this tab.