register and deregister old JavaScript based app objects with new TypeScript registry to receive observer and push calls

This commit is contained in:
Ralf Becker 2020-07-15 19:15:36 +02:00
parent fcd7a77c44
commit ab1e59c0df

View File

@ -139,6 +139,8 @@ var AppJS = (function(){ "use strict"; return Class.extend(
this._init_sidebox(sidebox);
}
}
// register with new TS app object to receive push and observer message
EgwApp._register_instance(this);
},
/**
@ -151,6 +153,12 @@ var AppJS = (function(){ "use strict"; return Class.extend(
this.sidebox.off();
delete this.sidebox;
if (!_app) delete app[this.appname];
// deregister with new TS app object
let index = -1;
if((index = EgwApp._instances.indexOf(this)) >= 0)
{
EgwApp._instances.splice(index,1);
}
},
/**