mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +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,9 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { getNotification } from 'Common/Translator';
|
||||
import { forEachObjectValue } from 'Common/Utils';
|
||||
import { addObservablesTo } from 'External/ko';
|
||||
import { delegateRunOnDestroy } from 'Common/UtilsUser';
|
||||
|
||||
import { SieveUserStore } from 'Stores/User/Sieve';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
|
@ -76,7 +73,6 @@ export class FiltersUserSettings /*extends AbstractViewSettings*/ {
|
|||
this.setError((data && data.ErrorMessageAdditional) || getNotification(iError));
|
||||
} else {
|
||||
this.scripts.remove(script);
|
||||
delegateRunOnDestroy(script);
|
||||
}
|
||||
},
|
||||
{name:script.name()}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue