// Get preferences & torrents from the daemon
var tr = this;
- this.remote.loadDaemonPrefs( );
+ this.loadDaemonPrefs( );
this.initalizeAllTorrents();
this.togglePeriodicRefresh( true );
},
+ loadDaemonPrefs: function(){
+ var tr = this;
+ this.remote.loadDaemonPrefs( function(data){
+ var o = data.arguments;
+ Prefs.getClutchPrefs( o );
+ tr.updatePrefs( o );
+ });
+ },
+
preloadImages: function() {
if (iPhone) {
this.loadImages(
} );
},
- loadDaemonPrefs: function() {
+ loadDaemonPrefs: function( callback ) {
var tr = this._controller;
var o = { method: 'session-get' };
- this.sendRequest( o, function(data) {
- var o = data.arguments;
- Prefs.getClutchPrefs( o );
- tr.updatePrefs( o );
- } );
+ this.sendRequest( o, callback );
},
getInitialDataFor: function(torrent_ids, callback) {
arguments: args
};
this.sendRequest( o, function() {
- remote.loadDaemonPrefs();
+ remote._controller.loadDaemonPrefs();
} );
}
};