mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[ASRangeControllerUpdateRangeProtocol] BREAKING Remove +setRangeModeForMemoryWarnings:, replace with global method
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "ASContextTransitioning.h"
|
#import "ASContextTransitioning.h"
|
||||||
|
#import "ASLayoutRangeType.h"
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@@ -116,6 +117,15 @@ ASDISPLAYNODE_EXTERN_C_END
|
|||||||
*/
|
*/
|
||||||
- (void)hierarchyDisplayDidFinish;
|
- (void)hierarchyDisplayDidFinish;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only ASLayoutRangeModeVisibleOnly or ASLayoutRangeModeLowMemory are recommended. Default is ASLayoutRangeModeVisibleOnly,
|
||||||
|
* because this is the only way to ensure an application will not have blank / flashing views as the user navigates back after
|
||||||
|
* a memory warning. Apps that wish to use the more effective / aggressive ASLayoutRangeModeLowMemory may need to take steps
|
||||||
|
* to mitigate this behavior, including: restoring a larger range mode to the next controller before the user navigates there,
|
||||||
|
* enabling .neverShowPlaceholders on ASCellNodes so that the navigation operation is blocked on redisplay completing, etc.
|
||||||
|
*/
|
||||||
|
+ (void)setRangeModeForMemoryWarnings:(ASLayoutRangeMode)rangeMode;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -599,3 +599,12 @@ static ASLayoutRangeMode __rangeModeForMemoryWarnings = ASLayoutRangeModeVisible
|
|||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@implementation ASDisplayNode (RangeModeConfiguring)
|
||||||
|
|
||||||
|
+ (void)setRangeModeForMemoryWarnings:(ASLayoutRangeMode)rangeMode
|
||||||
|
{
|
||||||
|
[ASRangeController setRangeModeForMemoryWarnings:rangeMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
|
|||||||
@@ -18,21 +18,4 @@
|
|||||||
*/
|
*/
|
||||||
- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode;
|
- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode;
|
||||||
|
|
||||||
/**
|
|
||||||
* Only ASLayoutRangeModeVisibleOnly or ASLayoutRangeModeLowMemory are recommended. Default is ASLayoutRangeModeVisibleOnly,
|
|
||||||
* because this is the only way to ensure an application will not have blank / flashing views as the user navigates back after
|
|
||||||
* a memory warning. Apps that wish to use the more effective / aggressive ASLayoutRangeModeLowMemory may need to take steps
|
|
||||||
* to mitigate this behavior, including: restoring a larger range mode to the next controller before the user navigates there,
|
|
||||||
* enabling .neverShowPlaceholders on ASCellNodes so that the navigation operation is blocked on redisplay completing, etc.
|
|
||||||
*/
|
|
||||||
+ (void)setRangeModeForMemoryWarnings:(ASLayoutRangeMode)rangeMode;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user