mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Implement warning assertion for supplementary views in ASCollectionView.
Make sure ASTableViewStressTest passes. It was sometimes testing a scenario UITableView itself doesn't support.
This commit is contained in:
@@ -110,11 +110,14 @@
|
||||
for (int i = 0; i < NumberOfReloadIterations; ++i) {
|
||||
UITableViewRowAnimation rowAnimation = (arc4random_uniform(1) == 0 ? UITableViewRowAnimationMiddle : UITableViewRowAnimationNone);
|
||||
|
||||
BOOL animatedScroll = (arc4random_uniform(1) == 0 ? YES : NO);
|
||||
BOOL reloadRowsInsteadOfSections = (arc4random_uniform(1) == 0 ? YES : NO);
|
||||
BOOL letRunloopProceed = (arc4random_uniform(1) == 0 ? YES : NO);
|
||||
BOOL addIndexPaths = (arc4random_uniform(1) == 0 ? YES : NO);
|
||||
BOOL useBeginEndUpdates = (arc4random_uniform(2) == 0 ? YES : NO);
|
||||
BOOL animatedScroll = (arc4random_uniform(2) == 0 ? YES : NO);
|
||||
BOOL reloadRowsInsteadOfSections = (arc4random_uniform(2) == 0 ? YES : NO);
|
||||
BOOL letRunloopProceed = (arc4random_uniform(2) == 0 ? YES : NO);
|
||||
BOOL useBeginEndUpdates = (arc4random_uniform(3) == 0 ? YES : NO);
|
||||
|
||||
// FIXME: Need to revise the logic to support mutating the data source rather than just reload thrashing.
|
||||
// UITableView itself does not support deleting a row in the same edit transaction as reloading it, for example.
|
||||
BOOL addIndexPaths = NO; //(arc4random_uniform(2) == 0 ? YES : NO);
|
||||
|
||||
if (useBeginEndUpdates) {
|
||||
[_tableView beginUpdates];
|
||||
|
||||
Reference in New Issue
Block a user