From e2c2bf5e50ea2f4376dc68e703d0c04586a0a44d Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Wed, 11 Oct 2017 11:49:50 +0200 Subject: [PATCH] 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 --- www/manager6/data/UpdateStore.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/www/manager6/data/UpdateStore.js b/www/manager6/data/UpdateStore.js index 6be36303..a8bc9efe 100644 --- a/www/manager6/data/UpdateStore.js +++ b/www/manager6/data/UpdateStore.js @@ -12,6 +12,13 @@ Ext.define('PVE.data.UpdateStore', { isStopped: true, + destroy: function() { + var me = this; + me.load_task.cancel(); + PVE.data.UpdateQueue.unqueue(me); + me.callParent(); + }, + constructor: function(config) { var me = this; @@ -56,9 +63,6 @@ Ext.define('PVE.data.UpdateStore', { me.callParent([config]); - me.on('destroy', function() { - load_task.cancel(); - PVE.data.UpdateQueue.unqueue(me); - }); + me.load_task = load_task; } });