mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-14 21:08:48 +00:00
Summary: Batch updates are complicated b/c its unknown when the update block will actually execute. When executing the block, we want to collect inserts/deletes/reloads/moves (item and section). Allow mutations to happen synchronously outside of the update block. Tracking state will also help with the auto-diff where we need to allow re-entrant updates. Peeling off a chunk from #494 Issue fixed: #288 - [x] All tests pass. Demo project builds and runs. - [x] I added tests, an experiment, or detailed why my change isn't tested. - [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes. Closes https://github.com/Instagram/IGListKit/pull/525 Reviewed By: jessesquires Differential Revision: D4656463 Pulled By: rnystrom fbshipit-source-id: 8f4d3dc21b03d595e02ee9ee9664277e8ead0531
31 lines
1.1 KiB
Objective-C
31 lines
1.1 KiB
Objective-C
/**
|
|
* Copyright (c) 2016-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <IGListKit/IGListKit.h>
|
|
|
|
@class IGTestObject;
|
|
|
|
@interface IGTestDelegateController : IGListSectionController <IGListSectionType, IGListDisplayDelegate, IGListWorkingRangeDelegate>
|
|
|
|
@property (nonatomic, strong) IGTestObject *item;
|
|
|
|
@property (nonatomic, assign) CGFloat height;
|
|
|
|
@property (nonatomic, copy) void (^itemUpdateBlock)();
|
|
@property (nonatomic, copy) void (^cellConfigureBlock)(IGTestDelegateController *);
|
|
@property (nonatomic, assign, readonly) NSInteger updateCount;
|
|
|
|
@property (nonatomic, assign) NSInteger willDisplayCount;
|
|
@property (nonatomic, assign) NSInteger didEndDisplayCount;
|
|
@property (nonatomic, strong) NSCountedSet *willDisplayCellIndexes;
|
|
@property (nonatomic, strong) NSCountedSet *didEndDisplayCellIndexes;
|
|
|
|
@end
|