From 40b2cb4513c1d9014b1851df57eb74882a20d7a3 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Fri, 26 Aug 2011 17:34:09 +0000 Subject: [PATCH] (trunk web) minor network traffic improvement: Transmission.js was periodically requesting redundant "Torrent.Fields.Stats" fields for selected torrents. --- web/javascript/transmission.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/web/javascript/transmission.js b/web/javascript/transmission.js index a8efeff27..291be727f 100644 --- a/web/javascript/transmission.js +++ b/web/javascript/transmission.js @@ -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');