change onLogout to logout

This commit is contained in:
Damien Churchill 2009-08-11 23:58:19 +00:00
parent 2c65d21b0b
commit c9b8428106
1 changed files with 10 additions and 10 deletions

View File

@ -87,6 +87,16 @@ Copyright:
})
},
logout: function() {
Deluge.Events.fire('logout');
Deluge.Client.auth.delete_session({
success: function(result) {
this.show(true);
},
scope: this
});
},
show: function(skipCheck) {
if (this.firstShow) {
Deluge.Client.on('error', this.onClientError, this);
@ -142,16 +152,6 @@ Copyright:
});
},
onLogout: function() {
Deluge.Events.fire('logout');
Deluge.Client.auth.delete_session({
success: function(result) {
this.show(true);
},
scope: this
});
},
onClientError: function(errorObj, response, requestOptions) {
if (errorObj.error.code == 1) {
Deluge.Events.fire('logout');