Prevent memory leaks in *Model

This commit is contained in:
djmaze 2020-10-25 11:46:58 +01:00
parent 48a9a03762
commit d7a4639d6b
22 changed files with 221 additions and 225 deletions

View file

@ -10,17 +10,20 @@ class IdentityModel extends AbstractModel {
constructor(id, email) {
super();
this.id = ko.observable(id || '');
this.email = ko.observable(email);
this.name = ko.observable('');
this.addObservables({
id: id || '',
email: email,
name: '',
this.replyTo = ko.observable('');
this.bcc = ko.observable('');
replyTo: '',
bcc: '',
this.signature = ko.observable('');
this.signatureInsertBefore = ko.observable(false);
signature: '',
signatureInsertBefore: false,
deleteAccess: false
});
this.deleteAccess = ko.observable(false);
this.canBeDeleted = ko.computed(() => !!this.id());
}