mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-02 12:48:45 +00:00
Fix simple issue with ASTableViewStressTest, make Table / Collection handle changes to dataSource / delegate.
This commit is contained in:
parent
d76c199368
commit
ee4b771d5d
@ -234,7 +234,8 @@ static BOOL _isInterceptedSelector(SEL sel)
|
|||||||
|
|
||||||
- (void)setDataSource:(id<UICollectionViewDataSource>)dataSource
|
- (void)setDataSource:(id<UICollectionViewDataSource>)dataSource
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssert(NO, @"ASCollectionView uses asyncDataSource, not UICollectionView's dataSource property.");
|
// UIKit can internally generate a call to this method upon changing the asyncDataSource; only assert for non-nil.
|
||||||
|
ASDisplayNodeAssert(dataSource == nil, @"ASCollectionView uses asyncDataSource, not UICollectionView's dataSource property.");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDelegate:(id<UICollectionViewDelegate>)delegate
|
- (void)setDelegate:(id<UICollectionViewDelegate>)delegate
|
||||||
|
|||||||
@ -259,7 +259,8 @@ void ASPerformBlockWithoutAnimation(BOOL withoutAnimation, void (^block)()) {
|
|||||||
|
|
||||||
- (void)setDataSource:(id<UITableViewDataSource>)dataSource
|
- (void)setDataSource:(id<UITableViewDataSource>)dataSource
|
||||||
{
|
{
|
||||||
ASDisplayNodeAssert(NO, @"ASTableView uses asyncDataSource, not UITableView's dataSource property.");
|
// UIKit can internally generate a call to this method upon changing the asyncDataSource; only assert for non-nil.
|
||||||
|
ASDisplayNodeAssert(dataSource == nil, @"ASTableView uses asyncDataSource, not UITableView's dataSource property.");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDelegate:(id<UITableViewDelegate>)delegate
|
- (void)setDelegate:(id<UITableViewDelegate>)delegate
|
||||||
|
|||||||
@ -100,9 +100,6 @@
|
|||||||
|
|
||||||
- (void)thrashTableView
|
- (void)thrashTableView
|
||||||
{
|
{
|
||||||
_tableView.asyncDelegate = self;
|
|
||||||
_tableView.asyncDataSource = self;
|
|
||||||
|
|
||||||
[_tableView reloadData];
|
[_tableView reloadData];
|
||||||
|
|
||||||
NSArray *indexPathsAddedAndRemoved = nil;
|
NSArray *indexPathsAddedAndRemoved = nil;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user