mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-17 02:49:57 +00:00
use asyncDisplayNodePerformOnMainThread
This commit is contained in:
parent
77113c6698
commit
fee3892f95
@ -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
|
Loading…
x
Reference in New Issue
Block a user