mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-13 13:36:31 +00:00
fix updateStore destroy
the store never fires/gets a destroy event, thus it never stops the load_task and never unqueues itself in case the store gets destroyed but not explicitely stopped with overriding the destroy method, this works now as intended Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
9950ec0f7d
commit
5f0f6b13b5
@ -15,6 +15,13 @@ Ext.define('Proxmox.data.UpdateStore', {
|
||||
|
||||
autoStart: false,
|
||||
|
||||
destroy: function() {
|
||||
var me = this;
|
||||
me.load_task.cancel();
|
||||
Proxmox.data.UpdateQueue.unqueue(me);
|
||||
me.callParent();
|
||||
},
|
||||
|
||||
constructor: function(config) {
|
||||
var me = this;
|
||||
|
||||
@ -59,10 +66,7 @@ Ext.define('Proxmox.data.UpdateStore', {
|
||||
|
||||
me.callParent([config]);
|
||||
|
||||
me.on('destroy', function() {
|
||||
load_task.cancel();
|
||||
Proxmox.data.UpdateQueue.unqueue(me);
|
||||
});
|
||||
me.load_task = load_task;
|
||||
|
||||
if (me.autoStart) {
|
||||
me.startUpdate();
|
||||
|
Loading…
Reference in New Issue
Block a user