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();
},
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;
}
this.outdateCount = 0;
if (this.seconds > 2) {
return setTimeout(this.update.bind(this), 1000);
ThreadUpdater.outdateCount = 0;
if (ThreadUpdater.seconds > 2) {
return setTimeout(ThreadUpdater.update, 1000);
}
},
visibility: function() {

View File

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