mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Remove more unused Knockout code
This commit is contained in:
parent
07857a06a9
commit
ac535b1d03
14 changed files with 155 additions and 355 deletions
|
|
@ -206,7 +206,7 @@
|
|||
ko.bindingEvent.notify(targetNode, ko.bindingEvent.childrenComplete);
|
||||
};
|
||||
|
||||
var shouldHideDestroyed = (options['includeDestroyed'] === false) || (ko.options['foreachHidesDestroyed'] && !options['includeDestroyed']);
|
||||
var shouldHideDestroyed = (options['includeDestroyed'] === false);
|
||||
|
||||
if (!shouldHideDestroyed && !options['beforeRemove'] && ko.isObservableArray(arrayOrObservableArray)) {
|
||||
setDomNodeChildrenFromArrayMapping(arrayOrObservableArray.peek());
|
||||
|
|
@ -225,9 +225,7 @@
|
|||
|
||||
if (shouldHideDestroyed) {
|
||||
// Filter out any entries marked as destroyed
|
||||
unwrappedArray = ko.utils.arrayFilter(unwrappedArray, item => {
|
||||
return item === undefined || item === null || !ko.utils.unwrapObservable(item['_destroy']);
|
||||
});
|
||||
unwrappedArray = unwrappedArray.filter(item => item || item == null);
|
||||
}
|
||||
setDomNodeChildrenFromArrayMapping(unwrappedArray);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue