mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Fix webpage transcription animation
This commit is contained in:
@@ -235,6 +235,7 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
|
||||
|
||||
var openMedia: ((InteractiveMediaNodeActivateContent) -> Void)?
|
||||
var activateAction: (() -> Void)?
|
||||
var requestUpdateLayout: (() -> Void)?
|
||||
|
||||
var visibility: ListViewItemNodeVisibility = .none {
|
||||
didSet {
|
||||
@@ -837,7 +838,7 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
|
||||
strongSelf.theme = presentationData.theme
|
||||
|
||||
strongSelf.lineNode.image = lineImage
|
||||
strongSelf.lineNode.frame = CGRect(origin: CGPoint(x: 13.0, y: insets.top), size: CGSize(width: 2.0, height: adjustedLineHeight - insets.top - insets.bottom - 2.0))
|
||||
animation.animator.updateFrame(layer: strongSelf.lineNode.layer, frame: CGRect(origin: CGPoint(x: 13.0, y: insets.top), size: CGSize(width: 2.0, height: adjustedLineHeight - insets.top - insets.bottom - 2.0)), completion: nil)
|
||||
strongSelf.lineNode.isHidden = !displayLine
|
||||
|
||||
strongSelf.textNode.displaysAsynchronously = !isPreview
|
||||
@@ -931,6 +932,11 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
|
||||
strongSelf.openMedia?(.default)
|
||||
}
|
||||
}
|
||||
contentFileNode.requestUpdateLayout = { [weak strongSelf] _ in
|
||||
if let strongSelf = strongSelf {
|
||||
strongSelf.requestUpdateLayout?()
|
||||
}
|
||||
}
|
||||
}
|
||||
if let (_, flags) = mediaAndFlags, flags.contains(.preferMediaBeforeText) {
|
||||
contentFileNode.frame = CGRect(origin: CGPoint(x: insets.left, y: insets.top), size: contentFileSize)
|
||||
|
||||
Reference in New Issue
Block a user