mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-14 12:58:34 +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
17 lines
584 B
Objective-C
17 lines
584 B
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>
|
|
|
|
typedef NS_ENUM (NSInteger, IGListBatchUpdateState) {
|
|
IGListBatchUpdateStateIdle,
|
|
IGListBatchUpdateStateQueuedBatchUpdate,
|
|
IGListBatchUpdateStateExecutingBatchUpdateBlock,
|
|
IGListBatchUpdateStateExecutedBatchUpdateBlock,
|
|
};
|