mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Functioning Preload range
Refactor how we do ranges so they can be arbitrarily managed. Introduce the concept of a preload range.
This commit is contained in:
@@ -162,9 +162,9 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
||||
}
|
||||
|
||||
#pragma mark - ASDisplayNode Overrides
|
||||
- (void)reclaimMemory
|
||||
- (void)clearRendering
|
||||
{
|
||||
[super reclaimMemory]; // This actually clears the contents, so we need to do this first for our displayedImageIdentifier to be meaningful.
|
||||
[super clearRendering]; // This actually clears the contents, so we need to do this first for our displayedImageIdentifier to be meaningful.
|
||||
[self _setDisplayedImageIdentifier:nil withImage:nil];
|
||||
|
||||
if (_downloadIdentifier) {
|
||||
@@ -177,6 +177,13 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
||||
{
|
||||
[super displayWillStart];
|
||||
|
||||
[self fetchRemoteData];
|
||||
}
|
||||
|
||||
- (void)fetchRemoteData
|
||||
{
|
||||
[super fetchRemoteData];
|
||||
|
||||
[self _loadImageIdentifiers];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user