diff --git a/ASDKListKit/Podfile b/ASDKListKit/Podfile index 4e40faab34..788a729896 100644 --- a/ASDKListKit/Podfile +++ b/ASDKListKit/Podfile @@ -3,7 +3,7 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' target 'ASDKListKitTests' do pod 'Texture/IGListKit', :path => '..' - pod 'IGListKit', :git => 'https://github.com/Instagram/IGListKit', :commit => 'e9e09d7' + pod 'IGListKit', :git => 'https://github.com/Instagram/IGListKit', :commit => '357a28e' pod 'JGMethodSwizzler', :git => 'https://github.com/JonasGessner/JGMethodSwizzler', :branch => 'master' end diff --git a/Texture.podspec b/Texture.podspec index 89ee0f4b03..1fc65b62a3 100644 --- a/Texture.podspec +++ b/Texture.podspec @@ -51,7 +51,7 @@ Pod::Spec.new do |spec| end spec.subspec 'IGListKit' do |igl| - igl.dependency 'IGListKit', '2.1.0' + igl.dependency 'IGListKit', '3.0.0' igl.dependency 'Texture/Core' end diff --git a/examples/ASDKgram/Sample/ASCollectionSectionController.m b/examples/ASDKgram/Sample/ASCollectionSectionController.m index 27284a1e99..2e5b657773 100644 --- a/examples/ASDKgram/Sample/ASCollectionSectionController.m +++ b/examples/ASDKgram/Sample/ASCollectionSectionController.m @@ -52,25 +52,19 @@ return; } - BOOL wasEmpty = (self.items.count == 0); - dispatch_async(self.diffingQueue, ^{ IGListIndexSetResult *result = IGListDiff(self.pendingItems, newItems, IGListDiffPointerPersonality); self.pendingItems = newItems; dispatch_async(dispatch_get_main_queue(), ^{ id ctx = self.collectionContext; - [ctx performBatchAnimated:animated updates:^{ - [ctx insertInSectionController:(id)self atIndexes:result.inserts]; - [ctx deleteInSectionController:(id)self atIndexes:result.deletes]; + [ctx performBatchAnimated:animated updates:^(id _Nonnull batchContext) { + [batchContext insertInSectionController:(id)self atIndexes:result.inserts]; + [batchContext deleteInSectionController:(id)self atIndexes:result.deletes]; _items = newItems; } completion:^(BOOL finished) { if (completion) { completion(); } - // WORKAROUND for https://github.com/Instagram/IGListKit/issues/378 - if (wasEmpty) { - [(IGListAdapter *)ctx performUpdatesAnimated:NO completion:nil]; - } }]; }); }); diff --git a/examples/ASDKgram/Sample/PhotoFeedListKitViewController.m b/examples/ASDKgram/Sample/PhotoFeedListKitViewController.m index 5aa50732b7..f01f8c8eea 100644 --- a/examples/ASDKgram/Sample/PhotoFeedListKitViewController.m +++ b/examples/ASDKgram/Sample/PhotoFeedListKitViewController.m @@ -65,7 +65,7 @@ { // Ask the first section controller to do the refreshing. id secCtrl = [self.listAdapter sectionControllerForObject:self.photoFeed]; - if ([secCtrl conformsToProtocol:@protocol(RefreshingSectionControllerType)]) { + if ([(NSObject*)secCtrl conformsToProtocol:@protocol(RefreshingSectionControllerType)]) { [secCtrl refreshContentWithCompletion:^{ [self.refreshCtrl endRefreshing]; }]; @@ -93,7 +93,7 @@ return self.spinner; } -- (IGListSectionController *)listAdapter:(IGListAdapter *)listAdapter sectionControllerForObject:(id)object +- (IGListSectionController *)listAdapter:(IGListAdapter *)listAdapter sectionControllerForObject:(id)object { if ([object isKindOfClass:[PhotoFeedModel class]]) { return [[PhotoFeedSectionController alloc] init]; diff --git a/examples/ASDKgram/Sample/PhotoFeedSectionController.h b/examples/ASDKgram/Sample/PhotoFeedSectionController.h index 37ca7a8f92..0da1836a68 100644 --- a/examples/ASDKgram/Sample/PhotoFeedSectionController.h +++ b/examples/ASDKgram/Sample/PhotoFeedSectionController.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface PhotoFeedSectionController : ASCollectionSectionController +@interface PhotoFeedSectionController : ASCollectionSectionController @property (nonatomic, strong, nullable) PhotoFeedModel *photoFeed; diff --git a/examples/ASDKgram/Sample/RefreshingSectionControllerType.h b/examples/ASDKgram/Sample/RefreshingSectionControllerType.h index d2ed2ee712..892a3a32ce 100644 --- a/examples/ASDKgram/Sample/RefreshingSectionControllerType.h +++ b/examples/ASDKgram/Sample/RefreshingSectionControllerType.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN -@protocol RefreshingSectionControllerType +@protocol RefreshingSectionControllerType - (void)refreshContentWithCompletion:(nullable void(^)())completion;