mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -429,7 +429,11 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode {
|
||||
strongSelf.currentImageArguments = arguments
|
||||
imageApply()
|
||||
|
||||
strongSelf.statusNode?.position = CGPoint(x: imageFrame.midX, y: imageFrame.midY)
|
||||
if let statusNode = strongSelf.statusNode {
|
||||
var statusFrame = statusNode.frame
|
||||
statusFrame.origin.x = floor(imageFrame.midX - statusFrame.width / 2.0)
|
||||
statusFrame.origin.y = floor(imageFrame.midY - statusFrame.height / 2.0)
|
||||
}
|
||||
|
||||
if let replaceVideoNode = replaceVideoNode {
|
||||
if let videoNode = strongSelf.videoNode {
|
||||
@@ -581,8 +585,8 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode {
|
||||
if progressRequired {
|
||||
if self.statusNode == nil {
|
||||
let statusNode = RadialStatusNode(backgroundNodeColor: theme.chat.bubble.mediaOverlayControlBackgroundColor)
|
||||
statusNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: radialStatusSize, height: radialStatusSize))
|
||||
statusNode.position = self.imageNode.position
|
||||
let imagePosition = self.imageNode.position
|
||||
statusNode.frame = CGRect(origin: CGPoint(x: floor(imagePosition.x - radialStatusSize / 2.0), y: floor(imagePosition.y - radialStatusSize / 2.0)), size: CGSize(width: radialStatusSize, height: radialStatusSize))
|
||||
self.statusNode = statusNode
|
||||
self.addSubnode(statusNode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user