1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-19 04:41:11 +00:00

(trunk web) minor network traffic improvement: Transmission.js was periodically requesting redundant "Torrent.Fields.Stats" fields for selected torrents.

This commit is contained in:
Jordan Lee 2011-08-26 17:34:09 +00:00
parent e8ba7986b6
commit 40b2cb4513

View file

@ -477,7 +477,6 @@ Transmission.prototype =
this.updateButtonStates();
this.updateInspector();
this.updateSelectedData();
clearTimeout(this.selectionChangedTimer);
delete this.selectionChangedTimer;
@ -770,20 +769,6 @@ Transmission.prototype =
}
},
/* Turn the periodic ajax torrents refresh on & off for the selected torrents */
periodicTorrentUpdate: function(ids) {
clearInterval (this._metadata_refresh);
delete this._metadata_refresh;
delete this._extra_data_ids;
if (ids && ids.length) {
this.refreshTorrents(ids);
this._extra_data_ids = ids;
var tr = this;
var msec = this.getIntervalMsec(Prefs._RefreshRate, 3);
this._metadata_refresh = setInterval(function() { tr.refreshTorrents(ids);}, msec);
}
},
/* Turn the periodic ajax session refresh on & off */
togglePeriodicSessionRefresh: function(enabled) {
clearInterval(this._periodic_session_refresh);
@ -818,15 +803,6 @@ Transmission.prototype =
this.remote.savePrefs(args);
},
updateSelectedData: function()
{
var ids = this.getSelectedTorrentIds();
if (ids.length > 0)
this.periodicTorrentUpdate(ids);
else
this.periodicTorrentUpdate(false);
},
updateTurtleButton: function() {
var t;
var w = $('#turtle_button');