Don't clear avatar node contents on hide

This commit is contained in:
Ali
2023-07-09 02:26:49 +04:00
parent 66a8c7e4a7
commit b47a8191c8
4 changed files with 7 additions and 1 deletions

View File

@@ -2998,7 +2998,7 @@ ASDISPLAYNODE_INLINE BOOL subtreeIsRasterized(ASDisplayNode *node) {
if ([self _implementsDisplay]) {
if (nowDisplay) {
[ASDisplayNode scheduleNodeForRecursiveDisplay:self];
} else {
} else if (!self.disableClearContentsOnHide) {
[[self asyncLayer] cancelAsyncDisplay];
//schedule clear contents on next runloop
dispatch_async(dispatch_get_main_queue(), ^{

View File

@@ -567,6 +567,8 @@ AS_EXTERN NSInteger const ASDefaultDrawingPriority;
*/
@property BOOL automaticallyRelayoutOnLayoutMarginsChanges;
@property (nonatomic) bool disableClearContentsOnHide;
@end
/**