Skip to content

Commit

Permalink
Remove configureUpdater
Browse files Browse the repository at this point in the history
  • Loading branch information
GreeMoz committed Jan 30, 2024
1 parent ff8bf67 commit 68d2f01
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions Source/Private/ASIGListAdapterBasedDataSource.mm
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ - (instancetype)initWithListAdapter:(IGListAdapter *)listAdapter collectionDeleg
#if IG_LIST_COLLECTION_VIEW
[ASIGListAdapterBasedDataSource setASCollectionViewSuperclass];
#endif
[ASIGListAdapterBasedDataSource configureUpdater:listAdapter.updater];

ASDisplayNodeAssert([listAdapter conformsToProtocol:@protocol(UICollectionViewDataSource)], @"Expected IGListAdapter to conform to UICollectionViewDataSource.");
ASDisplayNodeAssert([listAdapter conformsToProtocol:@protocol(UICollectionViewDelegateFlowLayout)], @"Expected IGListAdapter to conform to UICollectionViewDelegateFlowLayout.");
_listAdapter = listAdapter;
Expand Down Expand Up @@ -346,20 +344,6 @@ + (void)setASCollectionViewSuperclass
}
#endif

/// Ensure updater won't call reloadData on us.
+ (void)configureUpdater:(id<IGListUpdatingDelegate>)updater
{
// Cast to NSObject will be removed after https://github.com/Instagram/IGListKit/pull/435
if ([(id<NSObject>)updater isKindOfClass:[IGListAdapterUpdater class]]) {
[(IGListAdapterUpdater *)updater setAllowsBackgroundReloading:NO];
} else {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSLog(@"WARNING: Use of non-%@ updater with AsyncDisplayKit is discouraged. Updater: %@", NSStringFromClass([IGListAdapterUpdater class]), updater);
});
}
}

+ (ASSupplementarySourceOverrides)overridesForSupplementarySourceClass:(Class)c
{
static NSCache<Class, NSValue *> *cache;
Expand Down

0 comments on commit 68d2f01

Please sign in to comment.