mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 06:28:28 +03:00
Replaced tricky delegateRunOnDestroy() with koArrayWithDestroy()
koArrayWithDestroy creates ko.observableArray and calls the desired onDestroy() on entry delete.
This commit is contained in:
parent
f4bc796fb1
commit
e324e2f6b6
13 changed files with 32 additions and 55 deletions
|
|
@ -1,8 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
import { FilterModel } from 'Model/Filter';
|
||||
import { arrayLength, pString, b64EncodeJSON } from 'Common/Utils';
|
||||
import { koArrayWithDestroy } from 'External/ko';
|
||||
|
||||
const SIEVE_FILE_NAME = 'rainloop.user';
|
||||
|
||||
|
|
@ -275,7 +274,7 @@ export class SieveScriptModel extends AbstractModel
|
|||
hasChanges: false
|
||||
});
|
||||
|
||||
this.filters = ko.observableArray();
|
||||
this.filters = koArrayWithDestroy();
|
||||
// this.saving = ko.observable(false).extend({ debounce: 200 });
|
||||
|
||||
this.addSubscribables({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue