mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-10 16:29:55 +00:00
[ASDisplayNode] Deprecate -displayWillStart in favor of -displayWillStartAsynchronously: (#536)
* Deprecate -[ASDisplayNode displayWillStart] in favor of -displayWillStartAsynchronously: * Minor change * Fix CHANGELOG * Update CHANGELOG.md * Update CHANGELOG.md
This commit is contained in:
parent
d4b1f625aa
commit
786963c6a9
@ -8,7 +8,7 @@
|
|||||||
- Add -[ASDisplayNode detailedLayoutDescription] property to aid debugging. [Adlai Holler](https://github.com/Adlai-Holler) [#476](https://github.com/TextureGroup/Texture/pull/476)
|
- Add -[ASDisplayNode detailedLayoutDescription] property to aid debugging. [Adlai Holler](https://github.com/Adlai-Holler) [#476](https://github.com/TextureGroup/Texture/pull/476)
|
||||||
- Fix an issue that causes calculatedLayoutDidChange being called needlessly. [Huy Nguyen](https://github.com/nguyenhuy) [#490](https://github.com/TextureGroup/Texture/pull/490)
|
- Fix an issue that causes calculatedLayoutDidChange being called needlessly. [Huy Nguyen](https://github.com/nguyenhuy) [#490](https://github.com/TextureGroup/Texture/pull/490)
|
||||||
- Negate iOS 11 automatic estimated table row heights. [Christian Selig](https://github.com/christianselig) [#485](https://github.com/TextureGroup/Texture/pull/485)
|
- Negate iOS 11 automatic estimated table row heights. [Christian Selig](https://github.com/christianselig) [#485](https://github.com/TextureGroup/Texture/pull/485)
|
||||||
- [Breaking] Add content offset bridging property to ASTableNode and ASCollectionNode. Deprecate related methods in ASTableView and ASCollectionView [Huy Nguyen](https://github.com/nguyenhuy) [#460](https://github.com/TextureGroup/Texture/pull/460)
|
- Add content offset bridging property to ASTableNode and ASCollectionNode. Deprecate related methods in ASTableView and ASCollectionView [Huy Nguyen](https://github.com/nguyenhuy) [#460](https://github.com/TextureGroup/Texture/pull/460)
|
||||||
- Remove re-entrant access to self.view when applying initial pending state. [Adlai Holler](https://github.com/Adlai-Holler) [#510](https://github.com/TextureGroup/Texture/pull/510)
|
- Remove re-entrant access to self.view when applying initial pending state. [Adlai Holler](https://github.com/Adlai-Holler) [#510](https://github.com/TextureGroup/Texture/pull/510)
|
||||||
- Small improvements in ASCollectionLayout [Huy Nguyen](https://github.com/nguyenhuy) [#509](https://github.com/TextureGroup/Texture/pull/509) [#513](https://github.com/TextureGroup/Texture/pull/513)
|
- Small improvements in ASCollectionLayout [Huy Nguyen](https://github.com/nguyenhuy) [#509](https://github.com/TextureGroup/Texture/pull/509) [#513](https://github.com/TextureGroup/Texture/pull/513)
|
||||||
- Fix retain cycle between ASImageNode and PINAnimatedImage [Phil Larson](https://github.com/plarson) [#520](https://github.com/TextureGroup/Texture/pull/520)
|
- Fix retain cycle between ASImageNode and PINAnimatedImage [Phil Larson](https://github.com/plarson) [#520](https://github.com/TextureGroup/Texture/pull/520)
|
||||||
@ -19,6 +19,7 @@
|
|||||||
- [ASDisplayNode] Ensure `-displayWillStartAsynchronously:` and `-displayDidFinish` are invoked on rasterized subnodes. [Eric Scheers](https://github.com/smeis) [#532](https://github.com/TextureGroup/Texture/pull/532)
|
- [ASDisplayNode] Ensure `-displayWillStartAsynchronously:` and `-displayDidFinish` are invoked on rasterized subnodes. [Eric Scheers](https://github.com/smeis) [#532](https://github.com/TextureGroup/Texture/pull/532)
|
||||||
- Fixed a memory corruption issue in the ASImageNode display system. [Adlai Holler](https://github.com/Adlai-Holler) [#555](https://github.com/TextureGroup/Texture/pull/555)
|
- Fixed a memory corruption issue in the ASImageNode display system. [Adlai Holler](https://github.com/Adlai-Holler) [#555](https://github.com/TextureGroup/Texture/pull/555)
|
||||||
- [Breaking] Rename ASCollectionGalleryLayoutSizeProviding to ASCollectionGalleryLayoutPropertiesProviding. Besides a fixed item size, it now can provide interitem and line spacings, as well as section inset [Huy Nguyen](https://github.com/nguyenhuy) [#496](https://github.com/TextureGroup/Texture/pull/496) [#533](https://github.com/TextureGroup/Texture/pull/533)
|
- [Breaking] Rename ASCollectionGalleryLayoutSizeProviding to ASCollectionGalleryLayoutPropertiesProviding. Besides a fixed item size, it now can provide interitem and line spacings, as well as section inset [Huy Nguyen](https://github.com/nguyenhuy) [#496](https://github.com/TextureGroup/Texture/pull/496) [#533](https://github.com/TextureGroup/Texture/pull/533)
|
||||||
|
- Deprecate `-[ASDisplayNode displayWillStart]` in favor of `-displayWillStartAsynchronously:` [Huy Nguyen](https://github.com/nguyenhuy) [536](https://github.com/TextureGroup/Texture/pull/536)
|
||||||
|
|
||||||
##2.4
|
##2.4
|
||||||
- Fix an issue where inserting/deleting sections could lead to inconsistent supplementary element behavior. [Adlai Holler](https://github.com/Adlai-Holler)
|
- Fix an issue where inserting/deleting sections could lead to inconsistent supplementary element behavior. [Adlai Holler](https://github.com/Adlai-Holler)
|
||||||
|
|||||||
@ -315,6 +315,18 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*/
|
*/
|
||||||
- (nullable id<NSObject>)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer;
|
- (nullable id<NSObject>)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @abstract Indicates that the receiver is about to display.
|
||||||
|
*
|
||||||
|
* @discussion Deprecated in 2.5.
|
||||||
|
*
|
||||||
|
* @discussion Subclasses may override this method to be notified when display (asynchronous or synchronous) is
|
||||||
|
* about to begin.
|
||||||
|
*
|
||||||
|
* @note Called on the main thread only
|
||||||
|
*/
|
||||||
|
- (void)displayWillStart ASDISPLAYNODE_REQUIRES_SUPER ASDISPLAYNODE_DEPRECATED_MSG("Use displayWillStartAsynchronously: instead.");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @abstract Indicates that the receiver is about to display.
|
* @abstract Indicates that the receiver is about to display.
|
||||||
*
|
*
|
||||||
@ -323,7 +335,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*
|
*
|
||||||
* @note Called on the main thread only
|
* @note Called on the main thread only
|
||||||
*/
|
*/
|
||||||
- (void)displayWillStart ASDISPLAYNODE_REQUIRES_SUPER;
|
|
||||||
- (void)displayWillStartAsynchronously:(BOOL)asynchronously ASDISPLAYNODE_REQUIRES_SUPER;
|
- (void)displayWillStartAsynchronously:(BOOL)asynchronously ASDISPLAYNODE_REQUIRES_SUPER;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1533,7 +1533,11 @@ static void _recursivelySetDisplaySuspended(ASDisplayNode *node, CALayer *layer,
|
|||||||
- (void)willDisplayAsyncLayer:(_ASDisplayLayer *)layer asynchronously:(BOOL)asynchronously
|
- (void)willDisplayAsyncLayer:(_ASDisplayLayer *)layer asynchronously:(BOOL)asynchronously
|
||||||
{
|
{
|
||||||
// Subclass hook.
|
// Subclass hook.
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
[self displayWillStart];
|
[self displayWillStart];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
[self displayWillStartAsynchronously:asynchronously];
|
[self displayWillStartAsynchronously:asynchronously];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1546,7 +1550,6 @@ static void _recursivelySetDisplaySuspended(ASDisplayNode *node, CALayer *layer,
|
|||||||
- (void)displayWillStart {}
|
- (void)displayWillStart {}
|
||||||
- (void)displayWillStartAsynchronously:(BOOL)asynchronously
|
- (void)displayWillStartAsynchronously:(BOOL)asynchronously
|
||||||
{
|
{
|
||||||
[self displayWillStart]; // Subclass override
|
|
||||||
ASDisplayNodeAssertMainThread();
|
ASDisplayNodeAssertMainThread();
|
||||||
|
|
||||||
ASDisplayNodeLogEvent(self, @"displayWillStart");
|
ASDisplayNodeLogEvent(self, @"displayWillStart");
|
||||||
|
|||||||
@ -261,11 +261,11 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
return (self.image == nil && self.animatedImage == nil && self.imageIdentifiers.count > 0);
|
return (self.image == nil && self.animatedImage == nil && self.imageIdentifiers.count > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* displayWillStart in ASNetworkImageNode has a very similar implementation. Changes here are likely necessary
|
/* displayWillStartAsynchronously in ASNetworkImageNode has a very similar implementation. Changes here are likely necessary
|
||||||
in ASNetworkImageNode as well. */
|
in ASNetworkImageNode as well. */
|
||||||
- (void)displayWillStart
|
- (void)displayWillStartAsynchronously:(BOOL)asynchronously
|
||||||
{
|
{
|
||||||
[super displayWillStart];
|
[super displayWillStartAsynchronously:asynchronously];
|
||||||
|
|
||||||
[self didEnterPreloadState];
|
[self didEnterPreloadState];
|
||||||
|
|
||||||
|
|||||||
@ -313,7 +313,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
|||||||
return (self.image == nil && self.animatedImage == nil && _URL != nil);
|
return (self.image == nil && self.animatedImage == nil && _URL != nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* displayWillStart in ASMultiplexImageNode has a very similar implementation. Changes here are likely necessary
|
/* displayWillStartAsynchronously: in ASMultiplexImageNode has a very similar implementation. Changes here are likely necessary
|
||||||
in ASMultiplexImageNode as well. */
|
in ASMultiplexImageNode as well. */
|
||||||
- (void)displayWillStartAsynchronously:(BOOL)asynchronously
|
- (void)displayWillStartAsynchronously:(BOOL)asynchronously
|
||||||
{
|
{
|
||||||
|
|||||||
@ -335,7 +335,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASDisplayNodeAssert(_layer, @"Expect _layer to be not nil");
|
ASDisplayNodeAssert(layer, @"Expect _layer to be not nil");
|
||||||
|
|
||||||
// This block is called back on the main thread after rendering at the completion of the current async transaction, or immediately if !asynchronously
|
// This block is called back on the main thread after rendering at the completion of the current async transaction, or immediately if !asynchronously
|
||||||
asyncdisplaykit_async_transaction_operation_completion_block_t completionBlock = ^(id<NSObject> value, BOOL canceled){
|
asyncdisplaykit_async_transaction_operation_completion_block_t completionBlock = ^(id<NSObject> value, BOOL canceled){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user