mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
[ASDataController] Add validation logic to the change set to throw exceptions on invalid updates (#1894)
[_ASHierarchyChangeSet] Oopsy daisy [ASDataController] Tweak our update validation [ASHierarchyChangeSet] Fix bugs Finish up some stuff [ASDataController] Put some stuff back [ASChangeSetDataController] Always use changeset [ASDataController] Put other stuff back [_ASHierarchyChangeSet] Use fast enumeration [_ASHierarchyChangeSet] Fix assertion format strings, return on fail so we don't crash in production [ASDataController] Store data source item counts as vector rather than NSArray [ASDataController] Build some tests for the update validation [ASDataController] Fix issues with update validation Get rid of new file [ASDataController] Suppress changeset validation before initial reload [ASDataController] Make invalid update log vs. exception publicly toggleable
This commit is contained in:
@@ -124,6 +124,15 @@ FOUNDATION_EXPORT NSString * const ASDataControllerRowNodeKind;
|
||||
*/
|
||||
@property (nonatomic, weak) id<ASDataControllerEnvironmentDelegate> environmentDelegate;
|
||||
|
||||
/**
|
||||
* Returns YES if reloadData has been called at least once. Before this point it is
|
||||
* important to ignore/suppress some operations. For example, inserting a section
|
||||
* before the initial data load should have no effect.
|
||||
*
|
||||
* This must be called on the main thread.
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL initialReloadDataHasBeenCalled;
|
||||
|
||||
/** @name Data Updating */
|
||||
|
||||
- (void)beginUpdates;
|
||||
|
||||
Reference in New Issue
Block a user