Skip to content

Commit

Permalink
fix(385): Fixed a typo previuossectionMap -> previousSectionMap
Browse files Browse the repository at this point in the history
Summary:
I have fixed the typo in the code `previuossectionMap` -> `previousSectionMap`. I don't think this change requires to be tested as it appears to be an internal class. Because of this it's not a breaking change so I don't think it needs to be reflected in CHANGELOG.md either.

Closes #385

- [X] All tests pass. Demo project builds and runs.
- [X] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes #386

Differential Revision: D4390915

Pulled By: rnystrom

fbshipit-source-id: 1b745daaa913361ad211318ea1e216a03fe6f741
  • Loading branch information
weyert authored and facebook-github-bot committed Jan 9, 2017
1 parent 1b55215 commit fb4e823
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Source/IGListAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ - (void)performUpdatesAnimated:(BOOL)animated completion:(IGListUpdaterCompletio
objectTransitionBlock:^(NSArray *toObjects) {
// temporarily capture the item map that we are transitioning from in case
// there are any item deletes at the same
weakSelf.previoussectionMap = [weakSelf.sectionMap copy];
weakSelf.previousSectionMap = [weakSelf.sectionMap copy];

[weakSelf updateObjects:toObjects dataSource:dataSource];
} completion:^(BOOL finished) {
// release the previous items
weakSelf.previoussectionMap = nil;
weakSelf.previousSectionMap = nil;

if (completion) {
completion(finished);
Expand Down Expand Up @@ -521,8 +521,8 @@ - (void)updateBackgroundViewWithItemCount:(NSUInteger)itemCount {

- (IGListSectionMap *)sectionMapAdjustForUpdateBlock:(BOOL)adjustForUpdateBlock {
// if we are inside an update block, we may have to use the /previous/ item map for some operations
if (adjustForUpdateBlock && self.isInUpdateBlock && self.previoussectionMap != nil) {
return self.previoussectionMap;
if (adjustForUpdateBlock && self.isInUpdateBlock && self.previousSectionMap != nil) {
return self.previousSectionMap;
} else {
return self.sectionMap;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Internal/IGListAdapterInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ IGListCollectionContext
objects or section controllers.
*/
@property (nonatomic, assign) BOOL isInUpdateBlock;
@property (nonatomic, strong, nullable) IGListSectionMap *previoussectionMap;
@property (nonatomic, strong, nullable) IGListSectionMap *previousSectionMap;

@property (nonatomic, strong) NSMutableSet<Class> *registeredCellClasses;
@property (nonatomic, strong) NSMutableSet<NSString *> *registeredNibNames;
Expand Down

0 comments on commit fb4e823

Please sign in to comment.