mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-03-06 16:30:55 +00:00
use asyncDisplayNodePerformOnMainThread
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#import "ASFlowLayoutController.h"
|
||||
#import "ASRangeController.h"
|
||||
#import "ASDataController.h"
|
||||
#import "ASDisplayNodeInternal.h"
|
||||
|
||||
|
||||
#pragma mark -
|
||||
@@ -135,13 +136,9 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
{
|
||||
[_dataController reloadData];
|
||||
|
||||
if ([NSThread isMainThread]) {
|
||||
ASDisplayNodePerformBlockOnMainThread(^{
|
||||
[super reloadData];
|
||||
} else {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[super reloadData];
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- (void)setDataSource:(id<UICollectionViewDataSource>)dataSource
|
||||
@@ -13,6 +13,8 @@
|
||||
#import "ASFlowLayoutController.h"
|
||||
#import "ASLayoutController.h"
|
||||
#import "ASRangeController.h"
|
||||
#import "ASDisplayNodeInternal.h"
|
||||
|
||||
|
||||
|
||||
#pragma mark -
|
||||
@@ -185,14 +187,9 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
- (void)reloadData
|
||||
{
|
||||
[_dataController reloadData];
|
||||
|
||||
if ([NSThread isMainThread]) {
|
||||
ASDisplayNodePerformBlockOnMainThread(^{
|
||||
[super reloadData];
|
||||
} else {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[super reloadData];
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- (ASRangeTuningParameters)rangeTuningParameters
|
||||
Reference in New Issue
Block a user