More work on ThreadUpdater.disconnect()

This commit is contained in:
Zixaphir 2014-01-07 21:26:13 -07:00
parent bb3d9c9d84
commit b8dc8041f5
3 changed files with 20 additions and 4 deletions

View File

@ -8767,7 +8767,7 @@
});
$.on(this.settings, 'click', this.intervalShortcut);
subEntries.push({
el: settings
el: this.settings
});
$.event('AddMenuEntry', this.entry = {
type: 'header',
@ -8802,7 +8802,12 @@
$.off(input, 'change', this.cb.update);
}
$.off(this.settings, 'click', this.intervalShortcut);
$.off(window, 'online offline', this.cb.online);
$.off(d, 'QRPostSuccessful', this.cb.checkpost);
$.off(d, 'visibilitychange', this.cb.visibility);
$.event('rmMenuEntry', this.entry);
this.set('timer', null);
this.set('status', 'Offline', 'warning');
_ref1 = ['checkPostCount', 'timer', 'status', 'isUpdating', 'entry', 'dialog', 'thread', 'root', 'lastPost', 'outdateCount', 'online'];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
name = _ref1[_j];

View File

@ -8750,7 +8750,7 @@
});
$.on(this.settings, 'click', this.intervalShortcut);
subEntries.push({
el: settings
el: this.settings
});
$.event('AddMenuEntry', this.entry = {
type: 'header',
@ -8785,7 +8785,12 @@
$.off(input, 'change', this.cb.update);
}
$.off(this.settings, 'click', this.intervalShortcut);
$.off(window, 'online offline', this.cb.online);
$.off(d, 'QRPostSuccessful', this.cb.checkpost);
$.off(d, 'visibilitychange', this.cb.visibility);
$.event('rmMenuEntry', this.entry);
this.set('timer', null);
this.set('status', 'Offline', 'warning');
_ref1 = ['checkPostCount', 'timer', 'status', 'isUpdating', 'entry', 'dialog', 'thread', 'root', 'lastPost', 'outdateCount', 'online'];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
name = _ref1[_j];

View File

@ -48,7 +48,7 @@ ThreadUpdater =
$.on @settings, 'click', @intervalShortcut
subEntries.push el: settings
subEntries.push el: @settings
$.event 'AddMenuEntry', @entry =
type: 'header'
@ -78,10 +78,16 @@ ThreadUpdater =
$.off input, 'change', @cb.scrollBG
$.off input, 'change', @cb.update
$.off @settings, 'click', @intervalShortcut
$.off @settings, 'click', @intervalShortcut
$.off window, 'online offline', @cb.online
$.off d, 'QRPostSuccessful', @cb.checkpost
$.off d, 'visibilitychange', @cb.visibility
$.event 'rmMenuEntry', @entry
@set 'timer', null
@set 'status', 'Offline', 'warning'
delete @[name] for name in ['checkPostCount', 'timer', 'status', 'isUpdating', 'entry', 'dialog', 'thread', 'root', 'lastPost', 'outdateCount', 'online']
Thread.callbacks.rm 'Thread Updater'