From fb4e8238704906c4ec826bf2d677928249586a92 Mon Sep 17 00:00:00 2001 From: Weyert de Boer Date: Sat, 7 Jan 2017 09:34:07 -0800 Subject: [PATCH] fix(385): Fixed a typo previuossectionMap -> previousSectionMap 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 https://github.com/Instagram/IGListKit/pull/386 Differential Revision: D4390915 Pulled By: rnystrom fbshipit-source-id: 1b745daaa913361ad211318ea1e216a03fe6f741 --- Source/IGListAdapter.m | 8 ++++---- Source/Internal/IGListAdapterInternal.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/IGListAdapter.m b/Source/IGListAdapter.m index 3d389133..ea55cd16 100644 --- a/Source/IGListAdapter.m +++ b/Source/IGListAdapter.m @@ -266,12 +266,12 @@ 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); @@ -521,8 +521,8 @@ - (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; } diff --git a/Source/Internal/IGListAdapterInternal.h b/Source/Internal/IGListAdapterInternal.h index f8cc1137..73d8cb97 100644 --- a/Source/Internal/IGListAdapterInternal.h +++ b/Source/Internal/IGListAdapterInternal.h @@ -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 *registeredCellClasses; @property (nonatomic, strong) NSMutableSet *registeredNibNames;