mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASWrapperCellNode] Introduce a new class allowing more control of UIKit passthrough cells. (#797)
* - [ASWrapperCellNode] Introduce a new class allowing more control of UIKit passthrough cells. A few minor fixes to Collections behavior as well, including a new isSynchronized API. The difference from processingUpdates is that after Synchronized, all animations have also completed (or runloop turn if animations disabled, so .collectionViewLayout can be relied on being fully in sync). More upstreaming to come after this can land... * Fix -[ASDataController clearData] to take no action before initial data loading. * Empty commit to kick CI * Spacing change to kick CI (since an empty commit doesn't work...) * Tweak ASDataController changes to handle an edge case in _editingTransactionQueueCount management. * Avoid excess cyclic calls to onDidFinishProcessingUpdates: by avoiding ASMainSerialQueue. * Reverting my initial change as it wasn't the right approach, following the real fix before this.
This commit is contained in:
@@ -63,7 +63,21 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (atomic, weak, nullable) id<ASRangeManagingNode> owningNode;
|
||||
|
||||
@property (nonatomic, assign) BOOL shouldUseUIKitCell;
|
||||
@property (nonatomic, readonly) BOOL shouldUseUIKitCell;
|
||||
|
||||
@end
|
||||
|
||||
@class ASWrapperCellNode;
|
||||
|
||||
typedef CGSize (^ASSizeForItemBlock)(ASWrapperCellNode *node, CGSize collectionSize);
|
||||
typedef UICollectionViewCell * _Nonnull(^ASCellForItemBlock)(ASWrapperCellNode *node);
|
||||
typedef UICollectionReusableView * _Nonnull(^ASViewForSupplementaryBlock)(ASWrapperCellNode *node);
|
||||
|
||||
@interface ASWrapperCellNode : ASCellNode
|
||||
|
||||
@property (nonatomic, copy, readonly) ASSizeForItemBlock sizeForItemBlock;
|
||||
@property (nonatomic, copy, readonly) ASCellForItemBlock cellForItemBlock;
|
||||
@property (nonatomic, copy, readonly) ASViewForSupplementaryBlock viewForSupplementaryBlock;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user