mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Optimizations
This commit is contained in:
parent
fa93c6d791
commit
1bef1f55e4
@ -172,7 +172,7 @@ public final class MultilineTextWithEntitiesComponent: Component {
|
||||
self.textNode.longTapAttributeAction = component.longTapAction
|
||||
|
||||
if case let .curve(duration, _) = transition.animation, let previousText = previousText, previousText != attributedString.string {
|
||||
if let snapshotView = self.snapshotView(afterScreenUpdates: false) {
|
||||
if let snapshotView = self.snapshotContentTree() {
|
||||
snapshotView.center = self.center
|
||||
self.superview?.addSubview(snapshotView)
|
||||
|
||||
|
@ -205,7 +205,7 @@
|
||||
return;
|
||||
|
||||
[strongController dismissAnimated:true];
|
||||
if (strongSelf != nil) {
|
||||
if (strongSelf != nil && strongSelf.requestAvatarEditor) {
|
||||
strongSelf.requestAvatarEditor(^(UIImage *image, void (^commit)(void)) {
|
||||
__strong TGMediaAvatarMenuMixin *strongSelf = weakSelf;
|
||||
if (strongSelf == nil)
|
||||
|
@ -61,9 +61,11 @@ public final class ManagedFile {
|
||||
if let queue = self.queue {
|
||||
assert(queue.isCurrent())
|
||||
}
|
||||
if !self.isClosed {
|
||||
close(self.fd)
|
||||
self.isClosed = true
|
||||
}
|
||||
}
|
||||
|
||||
public func write(_ data: UnsafeRawPointer, count: Int) -> Int {
|
||||
if let queue = self.queue {
|
||||
|
@ -628,7 +628,7 @@ public final class RollingText: Component {
|
||||
|
||||
self.containerView.layer.removeAnimation(forKey: "opacity")
|
||||
}
|
||||
if let snapshotView = self.containerView.snapshotView(afterScreenUpdates: true) {
|
||||
if let snapshotView = self.containerView.snapshotContentTree() {
|
||||
let horizontalOffset = boundingRect.width - snapshotView.frame.width
|
||||
let verticalOffset: CGFloat = 12.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user