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
|
self.textNode.longTapAttributeAction = component.longTapAction
|
||||||
|
|
||||||
if case let .curve(duration, _) = transition.animation, let previousText = previousText, previousText != attributedString.string {
|
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
|
snapshotView.center = self.center
|
||||||
self.superview?.addSubview(snapshotView)
|
self.superview?.addSubview(snapshotView)
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
[strongController dismissAnimated:true];
|
[strongController dismissAnimated:true];
|
||||||
if (strongSelf != nil) {
|
if (strongSelf != nil && strongSelf.requestAvatarEditor) {
|
||||||
strongSelf.requestAvatarEditor(^(UIImage *image, void (^commit)(void)) {
|
strongSelf.requestAvatarEditor(^(UIImage *image, void (^commit)(void)) {
|
||||||
__strong TGMediaAvatarMenuMixin *strongSelf = weakSelf;
|
__strong TGMediaAvatarMenuMixin *strongSelf = weakSelf;
|
||||||
if (strongSelf == nil)
|
if (strongSelf == nil)
|
||||||
|
@ -61,8 +61,10 @@ public final class ManagedFile {
|
|||||||
if let queue = self.queue {
|
if let queue = self.queue {
|
||||||
assert(queue.isCurrent())
|
assert(queue.isCurrent())
|
||||||
}
|
}
|
||||||
close(self.fd)
|
if !self.isClosed {
|
||||||
self.isClosed = true
|
close(self.fd)
|
||||||
|
self.isClosed = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func write(_ data: UnsafeRawPointer, count: Int) -> Int {
|
public func write(_ data: UnsafeRawPointer, count: Int) -> Int {
|
||||||
|
@ -628,7 +628,7 @@ public final class RollingText: Component {
|
|||||||
|
|
||||||
self.containerView.layer.removeAnimation(forKey: "opacity")
|
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 horizontalOffset = boundingRect.width - snapshotView.frame.width
|
||||||
let verticalOffset: CGFloat = 12.0
|
let verticalOffset: CGFloat = 12.0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user