Video avatar fixes

This commit is contained in:
Ilya Laktyushin 2020-07-14 20:19:45 +03:00
parent 63a32bcbd8
commit fcd7dce58e
2 changed files with 7 additions and 3 deletions

View File

@ -666,9 +666,7 @@ const CGFloat TGPhotoTextSelectionViewHandleSide = 30.0f;
[self.path appendPath:[UIBezierPath bezierPathWithRoundedRect:cur cornerRadius:_radius]];
if (i == 0) {
last = cur;
//&& fabs(CGRectGetMaxY(last) - CGRectGetMinY(cur)) < 10.0
} else if (i > 0) {
} else if (i > 0 && fabs(CGRectGetMaxY(last) - CGRectGetMinY(cur)) < 10.0) {
CGPoint a = cur.origin;
CGPoint b = CGPointMake(CGRectGetMaxX(cur), cur.origin.y);
CGPoint c = CGPointMake(last.origin.x, CGRectGetMaxY(last));

View File

@ -209,6 +209,12 @@ final class PeerInfoAvatarListItemNode: ASDisplayNode {
if self.isCentral {
self.setupVideoPlayback()
} else {
if let videoNode = self.videoNode {
self.videoNode = nil
Queue.mainQueue().after(0.5) {
videoNode.removeFromSupernode()
}
}
// self.preloadDisposable.set(preloadVideoResource(postbox: self.context.account.postbox, resourceReference: ))
}
}