mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
attach to the "logout" event in the connectionmanager in onRender instead of onShow
fix clearing the torrent grid on logout
This commit is contained in:
parent
0f0c0cef9b
commit
ee028f2a52
@ -53,6 +53,13 @@ Deluge.Connections = {
|
||||
selection.selectRow(Deluge.Connections.selectedRow);
|
||||
},
|
||||
|
||||
onRender: function() {
|
||||
Deluge.Events.on('logout', function(e) {
|
||||
Deluge.Connections.disconnect();
|
||||
Deluge.Connections.Window.hide();
|
||||
});
|
||||
},
|
||||
|
||||
onSelect: function(selModel, rowIndex, record) {
|
||||
Deluge.Connections.selectedRow = rowIndex;
|
||||
},
|
||||
@ -60,10 +67,6 @@ Deluge.Connections = {
|
||||
onShow: function(window) {
|
||||
Deluge.Connections.running = Deluge.Connections.runCheck.periodical(2000);
|
||||
Deluge.Connections.runCheck();
|
||||
Deluge.Events.on('logout', function(e) {
|
||||
Deluge.Connections.disconnect();
|
||||
Deluge.Connections.Window.hide();
|
||||
});
|
||||
},
|
||||
|
||||
runCheck: function() {
|
||||
@ -126,6 +129,7 @@ Deluge.Connections.Window = new Ext.Window({
|
||||
}],
|
||||
listeners: {
|
||||
'hide': Deluge.Connections.onClose,
|
||||
'show': Deluge.Connections.onShow
|
||||
'show': Deluge.Connections.onShow,
|
||||
'render': Deluge.Connections.onRender
|
||||
}
|
||||
});
|
@ -134,7 +134,7 @@ Deluge.Ui = {
|
||||
if (this.running) {
|
||||
$clear(this.running);
|
||||
this.running = false;
|
||||
Deluge.Torrents.store.loadData([]);
|
||||
Deluge.Torrents.Store.loadData([]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user