mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Add ASExperimentalSkipClearData #trivial (#1136)
* Add ASExperimentalSkipClearData * Move the experiment check within the if clause
This commit is contained in:
committed by
GitHub
parent
696f344301
commit
4708522bd0
@@ -576,7 +576,8 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier";
|
||||
- (void)_asyncDelegateOrDataSourceDidChange
|
||||
{
|
||||
ASDisplayNodeAssertMainThread();
|
||||
if (_asyncDataSource == nil && _asyncDelegate == nil) {
|
||||
|
||||
if (_asyncDataSource == nil && _asyncDelegate == nil && !ASActivateExperimentalFeature(ASExperimentalSkipClearData)) {
|
||||
[_dataController clearData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ typedef NS_OPTIONS(NSUInteger, ASExperimentalFeatures) {
|
||||
ASExperimentalDeallocQueue = 1 << 6, // exp_dealloc_queue_v2
|
||||
ASExperimentalCollectionTeardown = 1 << 7, // exp_collection_teardown
|
||||
ASExperimentalFramesetterCache = 1 << 8, // exp_framesetter_cache
|
||||
ASExperimentalSkipClearData = 1 << 9, // exp_skip_clear_data
|
||||
ASExperimentalFeatureAll = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ NSArray<NSString *> *ASExperimentalFeaturesGetNames(ASExperimentalFeatures flags
|
||||
@"exp_network_image_queue",
|
||||
@"exp_dealloc_queue_v2",
|
||||
@"exp_collection_teardown",
|
||||
@"exp_framesetter_cache"]));
|
||||
@"exp_framesetter_cache"
|
||||
@"exp_skip_clear_data"]));
|
||||
|
||||
if (flags == ASExperimentalFeatureAll) {
|
||||
return allNames;
|
||||
|
||||
Reference in New Issue
Block a user