diff --git a/IGListKit.xcodeproj/project.pbxproj b/IGListKit.xcodeproj/project.pbxproj index 042a8ce4..38e54311 100644 --- a/IGListKit.xcodeproj/project.pbxproj +++ b/IGListKit.xcodeproj/project.pbxproj @@ -211,8 +211,6 @@ 7A02CFCD2361513600B49FAE /* IGListBatchUpdateState.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF782361513400B49FAE /* IGListBatchUpdateState.h */; }; 7A02CFCF2361513600B49FAE /* IGListDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF792361513400B49FAE /* IGListDebugger.h */; }; 7A02CFD02361513600B49FAE /* IGListDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF792361513400B49FAE /* IGListDebugger.h */; }; - 7A02CFD22361513600B49FAE /* IGListBatchUpdates.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF7A2361513400B49FAE /* IGListBatchUpdates.h */; }; - 7A02CFD32361513600B49FAE /* IGListBatchUpdates.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF7A2361513400B49FAE /* IGListBatchUpdates.h */; }; 7A02CFD82361513600B49FAE /* IGListBatchUpdateData+DebugDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A02CF7C2361513400B49FAE /* IGListBatchUpdateData+DebugDescription.m */; }; 7A02CFD92361513600B49FAE /* IGListBatchUpdateData+DebugDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A02CF7C2361513400B49FAE /* IGListBatchUpdateData+DebugDescription.m */; }; 7A02CFDB2361513600B49FAE /* IGListAdapterProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF7D2361513400B49FAE /* IGListAdapterProxy.h */; }; @@ -225,8 +223,6 @@ 7A02CFE52361513600B49FAE /* IGListDisplayHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A02CF802361513500B49FAE /* IGListDisplayHandler.m */; }; 7A02CFE72361513600B49FAE /* IGListArrayUtilsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF812361513500B49FAE /* IGListArrayUtilsInternal.h */; }; 7A02CFE82361513600B49FAE /* IGListArrayUtilsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF812361513500B49FAE /* IGListArrayUtilsInternal.h */; }; - 7A02CFEA2361513600B49FAE /* IGListBatchUpdates.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A02CF822361513500B49FAE /* IGListBatchUpdates.m */; }; - 7A02CFEB2361513600B49FAE /* IGListBatchUpdates.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A02CF822361513500B49FAE /* IGListBatchUpdates.m */; }; 7A02CFED2361513600B49FAE /* IGListDebuggingUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF832361513500B49FAE /* IGListDebuggingUtilities.h */; }; 7A02CFEE2361513600B49FAE /* IGListDebuggingUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A02CF832361513500B49FAE /* IGListDebuggingUtilities.h */; }; 7A02CFF02361513600B49FAE /* IGListBindingSectionController+DebugDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A02CF842361513500B49FAE /* IGListBindingSectionController+DebugDescription.m */; }; @@ -614,14 +610,12 @@ 7A02CF772361513400B49FAE /* UICollectionView+IGListBatchUpdateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UICollectionView+IGListBatchUpdateData.h"; sourceTree = ""; }; 7A02CF782361513400B49FAE /* IGListBatchUpdateState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IGListBatchUpdateState.h; sourceTree = ""; }; 7A02CF792361513400B49FAE /* IGListDebugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IGListDebugger.h; sourceTree = ""; }; - 7A02CF7A2361513400B49FAE /* IGListBatchUpdates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IGListBatchUpdates.h; sourceTree = ""; }; 7A02CF7C2361513400B49FAE /* IGListBatchUpdateData+DebugDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IGListBatchUpdateData+DebugDescription.m"; sourceTree = ""; }; 7A02CF7D2361513400B49FAE /* IGListAdapterProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IGListAdapterProxy.h; sourceTree = ""; }; 7A02CF7E2361513500B49FAE /* IGListAdapterUpdater+DebugDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IGListAdapterUpdater+DebugDescription.h"; sourceTree = ""; }; 7A02CF7F2361513500B49FAE /* IGListAdapter+DebugDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IGListAdapter+DebugDescription.h"; sourceTree = ""; }; 7A02CF802361513500B49FAE /* IGListDisplayHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IGListDisplayHandler.m; sourceTree = ""; }; 7A02CF812361513500B49FAE /* IGListArrayUtilsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IGListArrayUtilsInternal.h; sourceTree = ""; }; - 7A02CF822361513500B49FAE /* IGListBatchUpdates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IGListBatchUpdates.m; sourceTree = ""; }; 7A02CF832361513500B49FAE /* IGListDebuggingUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IGListDebuggingUtilities.h; sourceTree = ""; }; 7A02CF842361513500B49FAE /* IGListBindingSectionController+DebugDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IGListBindingSectionController+DebugDescription.m"; sourceTree = ""; }; 7A02CF852361513500B49FAE /* IGListAdapter+UICollectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IGListAdapter+UICollectionView.m"; sourceTree = ""; }; @@ -927,8 +921,6 @@ 7A02CF812361513500B49FAE /* IGListArrayUtilsInternal.h */, 7A02CF8C2361513500B49FAE /* IGListBatchUpdateData+DebugDescription.h */, 7A02CF7C2361513400B49FAE /* IGListBatchUpdateData+DebugDescription.m */, - 7A02CF7A2361513400B49FAE /* IGListBatchUpdates.h */, - 7A02CF822361513500B49FAE /* IGListBatchUpdates.m */, 7A02CF782361513400B49FAE /* IGListBatchUpdateState.h */, 57B22E7B2502AAC40055DC2F /* IGListBatchUpdateTransaction.h */, 57B22E712502AAC20055DC2F /* IGListBatchUpdateTransaction.m */, @@ -1290,7 +1282,6 @@ 7A02CF5B2361511100B49FAE /* IGListAdapterUpdater.h in Headers */, 7A02CF252361511100B49FAE /* IGListAdapterUpdateListener.h in Headers */, 7A02D00F2361513600B49FAE /* IGListWorkingRangeHandler.h in Headers */, - 7A02CFD32361513600B49FAE /* IGListBatchUpdates.h in Headers */, 7A02CFA32361513600B49FAE /* UIScrollView+IGListKit.h in Headers */, 7A02CEF52361511100B49FAE /* IGListWorkingRangeDelegate.h in Headers */, 7A02CEF82361511100B49FAE /* IGListAdapter.h in Headers */, @@ -1370,7 +1361,6 @@ 57B22E6F2502AAB20055DC2F /* IGListTransitionData.h in Headers */, 7A02CF5A2361511100B49FAE /* IGListAdapterUpdater.h in Headers */, 7A02CFA82361513600B49FAE /* UICollectionViewLayout+InteractiveReordering.h in Headers */, - 7A02CFD22361513600B49FAE /* IGListBatchUpdates.h in Headers */, 7A02CF452361511100B49FAE /* IGListAdapterPerformanceDelegate.h in Headers */, 7A02D0022361513600B49FAE /* IGListSectionControllerInternal.h in Headers */, 7A02CFC92361513600B49FAE /* UICollectionView+IGListBatchUpdateData.h in Headers */, @@ -1945,7 +1935,6 @@ 0A8928FF26CDA62C003FABD8 /* IGListBatchUpdateTransaction.m in Sources */, 0A89290226CDA672003FABD8 /* IGListItemUpdatesCollector.m in Sources */, 7A02CF492361511100B49FAE /* IGListSingleSectionController.m in Sources */, - 7A02CFEB2361513600B49FAE /* IGListBatchUpdates.m in Sources */, 0A8928FC26CDA5BD003FABD8 /* IGListReloadTransaction.m in Sources */, 7A02CF132361511100B49FAE /* IGListGenericSectionController.m in Sources */, 7A02CFA62361513600B49FAE /* UICollectionView+IGListBatchUpdateData.m in Sources */, @@ -2049,7 +2038,6 @@ buildActionMask = 2147483647; files = ( 7A02CF482361511100B49FAE /* IGListSingleSectionController.m in Sources */, - 7A02CFEA2361513600B49FAE /* IGListBatchUpdates.m in Sources */, 57B22E872502AAC40055DC2F /* IGListDataSourceChangeTransaction.m in Sources */, 7A02CF122361511100B49FAE /* IGListGenericSectionController.m in Sources */, 7A02CFA52361513600B49FAE /* UICollectionView+IGListBatchUpdateData.m in Sources */, diff --git a/Source/IGListKit/Internal/IGListBatchUpdates.h b/Source/IGListKit/Internal/IGListBatchUpdates.h deleted file mode 100644 index 739fbeb4..00000000 --- a/Source/IGListKit/Internal/IGListBatchUpdates.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import - -#if !__has_include() -#import "IGListMacros.h" -#else -#import -#endif - -@class IGListMoveIndexPath; -@class IGListReloadIndexPath; - -IGLK_SUBCLASSING_RESTRICTED -@interface IGListBatchUpdates : NSObject - -@property (nonatomic, strong, readonly) NSMutableIndexSet *sectionReloads; -@property (nonatomic, strong, readonly) NSMutableArray *itemInserts; -@property (nonatomic, strong, readonly) NSMutableArray *itemDeletes; -@property (nonatomic, strong, readonly) NSMutableArray *itemReloads; -@property (nonatomic, strong, readonly) NSMutableArray *itemMoves; - -@property (nonatomic, strong, readonly) NSMutableArray *itemUpdateBlocks; -@property (nonatomic, strong, readonly) NSMutableArray *itemCompletionBlocks; - -- (BOOL)hasChanges; - -@end diff --git a/Source/IGListKit/Internal/IGListBatchUpdates.m b/Source/IGListKit/Internal/IGListBatchUpdates.m deleted file mode 100644 index d8c6ea95..00000000 --- a/Source/IGListKit/Internal/IGListBatchUpdates.m +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#import "IGListBatchUpdates.h" - -@implementation IGListBatchUpdates - -- (instancetype)init { - if (self = [super init]) { - _sectionReloads = [NSMutableIndexSet new]; - _itemInserts = [NSMutableArray new]; - _itemMoves = [NSMutableArray new]; - _itemDeletes = [NSMutableArray new]; - _itemReloads = [NSMutableArray new]; - _itemUpdateBlocks = [NSMutableArray new]; - _itemCompletionBlocks = [NSMutableArray new]; - } - return self; -} - -- (BOOL)hasChanges { - return [self.itemUpdateBlocks count] > 0 - || [self.sectionReloads count] > 0 - || [self.itemInserts count] > 0 - || [self.itemMoves count] > 0 - || [self.itemReloads count] > 0 - || [self.itemDeletes count] > 0; -} - -@end diff --git a/Source/IGListKit/Internal/IGListItemUpdatesCollector.h b/Source/IGListKit/Internal/IGListItemUpdatesCollector.h index 75a3de10..7025ca82 100644 --- a/Source/IGListKit/Internal/IGListItemUpdatesCollector.h +++ b/Source/IGListKit/Internal/IGListItemUpdatesCollector.h @@ -16,7 +16,7 @@ @class IGListMoveIndexPath; @class IGListReloadIndexPath; -/// Object to collect item updates. Will replace `IGListBatchUpdates`. +/// Object to collect item updates. IGLK_SUBCLASSING_RESTRICTED @interface IGListItemUpdatesCollector : NSObject