mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Don't clear avatar node contents on hide
This commit is contained in:
parent
66a8c7e4a7
commit
b47a8191c8
@ -2998,7 +2998,7 @@ ASDISPLAYNODE_INLINE BOOL subtreeIsRasterized(ASDisplayNode *node) {
|
|||||||
if ([self _implementsDisplay]) {
|
if ([self _implementsDisplay]) {
|
||||||
if (nowDisplay) {
|
if (nowDisplay) {
|
||||||
[ASDisplayNode scheduleNodeForRecursiveDisplay:self];
|
[ASDisplayNode scheduleNodeForRecursiveDisplay:self];
|
||||||
} else {
|
} else if (!self.disableClearContentsOnHide) {
|
||||||
[[self asyncLayer] cancelAsyncDisplay];
|
[[self asyncLayer] cancelAsyncDisplay];
|
||||||
//schedule clear contents on next runloop
|
//schedule clear contents on next runloop
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
@ -567,6 +567,8 @@ AS_EXTERN NSInteger const ASDefaultDrawingPriority;
|
|||||||
*/
|
*/
|
||||||
@property BOOL automaticallyRelayoutOnLayoutMarginsChanges;
|
@property BOOL automaticallyRelayoutOnLayoutMarginsChanges;
|
||||||
|
|
||||||
|
@property (nonatomic) bool disableClearContentsOnHide;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -296,6 +296,7 @@ public final class AvatarNode: ASDisplayNode {
|
|||||||
|
|
||||||
self.isOpaque = false
|
self.isOpaque = false
|
||||||
self.displaysAsynchronously = true
|
self.displaysAsynchronously = true
|
||||||
|
self.disableClearContentsOnHide = true
|
||||||
|
|
||||||
self.imageNode.isLayerBacked = true
|
self.imageNode.isLayerBacked = true
|
||||||
self.addSubnode(self.imageNode)
|
self.addSubnode(self.imageNode)
|
||||||
|
@ -275,6 +275,9 @@ private final class PeerInfoScreenMemberItemNode: PeerInfoScreenItemNode {
|
|||||||
} else if item.context.account.peerId == item.member.id {
|
} else if item.context.account.peerId == item.member.id {
|
||||||
highlight = false
|
highlight = false
|
||||||
}
|
}
|
||||||
|
if let point, let itemNode = self.itemNode, let value = itemNode.view.hitTest(self.view.convert(point, to: itemNode.view), with: nil), value is UIControl {
|
||||||
|
highlight = false
|
||||||
|
}
|
||||||
if highlight {
|
if highlight {
|
||||||
self.selectionNode.updateIsHighlighted(true)
|
self.selectionNode.updateIsHighlighted(true)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user