mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various fixes
This commit is contained in:
@@ -242,14 +242,8 @@ private final class ProxyServerInfoItemNode: ActionSheetItemNode {
|
||||
self.setNeedsLayout()
|
||||
}
|
||||
|
||||
override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
|
||||
return CGSize(width: constrainedSize.width, height: 36.0 * CGFloat(self.fieldNodes.count) + 12.0)
|
||||
}
|
||||
|
||||
override func layout() {
|
||||
super.layout()
|
||||
|
||||
let size = self.bounds.size
|
||||
public override func updateLayout(constrainedSize: CGSize, transition: ContainedViewLayoutTransition) -> CGSize {
|
||||
let size = CGSize(width: constrainedSize.width, height: 36.0 * CGFloat(self.fieldNodes.count) + 12.0)
|
||||
|
||||
var offset: CGFloat = 15.0
|
||||
for (lhs, rhs) in self.fieldNodes {
|
||||
@@ -261,6 +255,9 @@ private final class ProxyServerInfoItemNode: ActionSheetItemNode {
|
||||
|
||||
offset += 36.0
|
||||
}
|
||||
|
||||
self.updateInternalLayout(size)
|
||||
return size
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,14 +357,8 @@ private final class ProxyServerActionItemNode: ActionSheetItemNode {
|
||||
}
|
||||
}
|
||||
|
||||
override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
|
||||
return CGSize(width: constrainedSize.width, height: 57.0)
|
||||
}
|
||||
|
||||
override func layout() {
|
||||
super.layout()
|
||||
|
||||
let size = self.bounds.size
|
||||
public override func updateLayout(constrainedSize: CGSize, transition: ContainedViewLayoutTransition) -> CGSize {
|
||||
let size = CGSize(width: constrainedSize.width, height: 57.0)
|
||||
|
||||
self.buttonNode.frame = CGRect(origin: CGPoint(), size: size)
|
||||
|
||||
@@ -376,8 +367,11 @@ private final class ProxyServerActionItemNode: ActionSheetItemNode {
|
||||
let activitySize = self.activityIndicator.measure(CGSize(width: 100.0, height: 100.0))
|
||||
self.titleNode.frame = titleFrame
|
||||
self.activityIndicator.frame = CGRect(origin: CGPoint(x: 14.0, y: titleFrame.minY - 0.0), size: activitySize)
|
||||
|
||||
self.updateInternalLayout(size)
|
||||
return size
|
||||
}
|
||||
|
||||
|
||||
@objc private func buttonPressed() {
|
||||
let proxyServerSettings = self.server
|
||||
let _ = (self.accountManager.transaction { transaction -> ProxySettings in
|
||||
|
||||
Reference in New Issue
Block a user