Various crash fixes

This commit is contained in:
Ilya Laktyushin
2019-10-07 14:54:35 +03:00
parent 72ff18cbf7
commit 09e2e16353
3 changed files with 6 additions and 2 deletions

View File

@@ -472,7 +472,7 @@ ASSynthesizeLockingMethodsWithMutex(__instanceLock__);
[self baseWillDealloc];
// Synchronous nodes may not be able to call the hierarchy notifications, so only enforce for regular nodes.
ASDisplayNodeAssert(checkFlag(Synchronous) || !ASInterfaceStateIncludesVisible(_interfaceState), @"Node should always be marked invisible before deallocating. Node: %@", self);
//ASDisplayNodeAssert(checkFlag(Synchronous) || !ASInterfaceStateIncludesVisible(_interfaceState), @"Node should always be marked invisible before deallocating. Node: %@", self);
self.asyncLayer.asyncDelegate = nil;
_view.asyncdisplaykit_node = nil;

View File

@@ -131,7 +131,7 @@ private final class UniversalVideoGalleryItemPictureInPictureNode: ASDisplayNode
func updateLayout(_ size: CGSize, transition: ContainedViewLayoutTransition) {
let iconSize = self.iconNode.image?.size ?? CGSize()
let textSize = self.textNode.measure(CGSize(width: size.width - 20.0, height: CGFloat.greatestFiniteMagnitude))
let textSize = self.textNode.measure(CGSize(width: max(0.0, size.width - 20.0), height: CGFloat.greatestFiniteMagnitude))
let spacing: CGFloat = 10.0
let contentHeight = iconSize.height + spacing + textSize.height
let contentVerticalOrigin = floor((size.height - contentHeight) / 2.0)

View File

@@ -1011,6 +1011,10 @@ TGNavigationController *findNavigationController()
@implementation TGNavigationPanGestureRecognizer
- (UIRectEdge)edges {
return UIRectEdgeLeft;
}
- (void)_setEdgeRegionSize:(CGFloat)edgeRegionSize
{
__edgeRegionSize = edgeRegionSize;