Threadupdater stuff

This commit is contained in:
Zixaphir 2014-03-09 16:04:16 -07:00
parent f96e046af4
commit bbb41dd226
3 changed files with 13 additions and 17 deletions

View File

@ -9457,12 +9457,10 @@
} else { } else {
this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>"); this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>");
$.addClass(doc, 'float'); $.addClass(doc, 'float');
$.ready((function(_this) { $.ready(function() {
return function() { $.addClass(doc, 'float');
$.addClass(doc, 'float'); return $.add(d.body, sc);
return $.add(d.body, sc); });
};
})(this));
} }
this.checkPostCount = 0; this.checkPostCount = 0;
this.timer = $('#update-timer', sc); this.timer = $('#update-timer', sc);

View File

@ -9472,12 +9472,10 @@
} else { } else {
this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>"); this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>");
$.addClass(doc, 'float'); $.addClass(doc, 'float');
$.ready((function(_this) { $.ready(function() {
return function() { $.addClass(doc, 'float');
$.addClass(doc, 'float'); return $.add(d.body, sc);
return $.add(d.body, sc); });
};
})(this));
} }
this.checkPostCount = 0; this.checkPostCount = 0;
this.timer = $('#update-timer', sc); this.timer = $('#update-timer', sc);

View File

@ -8,11 +8,11 @@ ThreadUpdater =
id: 'updater' id: 'updater'
$.ready -> $.ready ->
Header.addShortcut sc Header.addShortcut sc
else else
@dialog = sc = UI.dialog 'updater', 'bottom: 0px; left: 0px;', @dialog = sc = UI.dialog 'updater', 'bottom: 0px; left: 0px;',
"<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>" "<div class=move></div><span id=update-status></span><span id=update-timer title='Update now'></span>"
$.addClass doc, 'float' $.addClass doc, 'float'
$.ready => $.ready ->
$.addClass doc, 'float' $.addClass doc, 'float'
$.add d.body, sc $.add d.body, sc
@ -57,12 +57,12 @@ ThreadUpdater =
Thread.callbacks.push Thread.callbacks.push
name: 'Thread Updater' name: 'Thread Updater'
cb: @node cb: @node
disconnect: -> disconnect: ->
return if g.VIEW isnt 'thread' or !Conf['Thread Updater'] return if g.VIEW isnt 'thread' or !Conf['Thread Updater']
$.off @timer, 'click', @update $.off @timer, 'click', @update
$.off @status, 'click', @update $.off @status, 'click', @update
clearTimeout @timeoutID if @timeoutID clearTimeout @timeoutID if @timeoutID
for entry in @entry.subEntries for entry in @entry.subEntries
@ -182,7 +182,7 @@ ThreadUpdater =
setInterval: -> setInterval: ->
i = ThreadUpdater.interval + 1 i = ThreadUpdater.interval + 1
if Conf['Optional Increase'] if Conf['Optional Increase']
# Lower the max refresh rate limit on visible tabs. # Lower the max refresh rate limit on visible tabs.
cur = ThreadUpdater.outdateCount or 1 cur = ThreadUpdater.outdateCount or 1