mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Prevent deallocation of asyncDataSource and asyncDelegate in ASCollectionView and ASTableView
Grab a strong reference for asyncDataSource and asyncDelegate in ASCollectionView and ASTableView before executing the range update to be sure they are not going away while executing the range update. This can happen in range updates while going back in the view controller hierarchy
This commit is contained in:
@@ -49,6 +49,12 @@
|
||||
*/
|
||||
- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode;
|
||||
|
||||
/**
|
||||
* Schedule a range update and call the completion block if finished. This drives updating the working
|
||||
* ranges, and triggering their actions.
|
||||
*/
|
||||
- (void)scheduleRangeUpdateCompletion:(void (^)(void))completion;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -64,7 +70,10 @@
|
||||
|
||||
@interface ASViewController (ASRangeControllerUpdateRangeProtocol)
|
||||
|
||||
/// Automatically adjust range mode based on view events if the containing node confirms to the ASRangeControllerUpdateRangeProtocol
|
||||
/**
|
||||
* Automatically adjust range mode based on view events if the containing node confirms to the
|
||||
* ASRangeControllerUpdateRangeProtocol
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL automaticallyAdjustRangeModeBasedOnViewEvents;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user