mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-19 19:14:55 +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
2 changed files with 10 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue