README and documentationI'm trying to implement the diff part in Swift. I found this code in IGListIndexSetResult.m resultForBatchUpdates:
// convert all update+move to delete+insert
const NSUInteger moveCount = moves.count;
for (NSInteger i = moveCount - 1; i >= 0; i--) {
IGListMoveIndex *move = moves[i];
if ([filteredUpdates containsIndex:move.from]) {
[filteredMoves removeObjectAtIndex:i];
[filteredUpdates removeIndex:move.from];
[deletes addIndex:move.from];
[inserts addIndex:move.to];
}
}
In line 5, filteredMoves removes object at index i, since filteredMoves will change when enumerating, this cannot guarantee the specific IGListMoveIndex object will be removed. Was that on purpose?
I figured this out , the enumeration was reversed.
Most helpful comment
I figured this out , the enumeration was reversed.