mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Remove unused KnockoutJS afterMove
This commit is contained in:
parent
130397dd89
commit
244d4c49c5
4 changed files with 66 additions and 82 deletions
|
|
@ -18,8 +18,7 @@ ko.bindingHandlers['foreach'] = {
|
|||
return {
|
||||
'foreach': unwrappedValue['data'],
|
||||
'as': unwrappedValue['as'],
|
||||
'beforeRemove': unwrappedValue['beforeRemove'],
|
||||
'afterMove': unwrappedValue['afterMove']
|
||||
'beforeRemove': unwrappedValue['beforeRemove']
|
||||
};
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@
|
|||
var nodesToDelete = [];
|
||||
var itemsToMoveFirstIndexes = [];
|
||||
var itemsForBeforeRemoveCallbacks = [];
|
||||
var itemsForAfterMoveCallbacks = [];
|
||||
var mapData;
|
||||
var countWaitingForRemove = 0;
|
||||
|
||||
|
|
@ -71,9 +70,6 @@
|
|||
|
||||
function itemMovedOrRetained(oldPosition) {
|
||||
mapData = lastMappingResult[oldPosition];
|
||||
if (currentArrayIndex !== mapData.indexObservable.peek()) {
|
||||
itemsForAfterMoveCallbacks[currentArrayIndex] = mapData;
|
||||
}
|
||||
// Since updating the index might change the nodes, do so before calling fixUpContinuousNodeArray
|
||||
mapData.indexObservable(currentArrayIndex++);
|
||||
ko.utils.fixUpContinuousNodeArray(mapData.mappedNodes, domNode);
|
||||
|
|
@ -227,8 +223,5 @@
|
|||
itemsForBeforeRemoveCallbacks[i].arrayEntry = deletedItemDummyValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Finally call afterMove and afterAdd callbacks
|
||||
callCallback(options['afterMove'], itemsForAfterMoveCallbacks);
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue