Make it possible to map between sections even if they're empty (#660)

* Make section mapping work even for empty sections

* Unlock more cases and update changelog

* Fix complexity documentation
This commit is contained in:
Adlai Holler
2017-11-03 16:24:48 -07:00
committed by GitHub
parent ff608c92bf
commit 4fc753a458
9 changed files with 95 additions and 83 deletions

View File

@@ -48,7 +48,7 @@ typedef NSMutableDictionary<NSString *, NSMutableDictionary<NSIndexPath *, ASCol
return [[ASElementMap alloc] initWithSections:_sections items:_sectionsOfItems supplementaryElements:_supplementaryElements];
}
- (void)removeAllSectionContexts
- (void)removeAllSections
{
[_sections removeAllObjects];
}
@@ -63,7 +63,7 @@ typedef NSMutableDictionary<NSString *, NSMutableDictionary<NSIndexPath *, ASCol
ASDeleteElementsInTwoDimensionalArrayAtIndexPaths(_sectionsOfItems, indexPaths);
}
- (void)removeSectionContextsAtIndexes:(NSIndexSet *)indexes
- (void)removeSectionsAtIndexes:(NSIndexSet *)indexes
{
[_sections removeObjectsAtIndexes:indexes];
}