mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various fixes
This commit is contained in:
@@ -87,7 +87,7 @@ private final class ChannelDiscussionGroupActionSheetItemNode: ActionSheetItemNo
|
||||
self.textNode.attributedText = attributedText
|
||||
}
|
||||
|
||||
override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
|
||||
public override func updateLayout(constrainedSize: CGSize, transition: ContainedViewLayoutTransition) -> CGSize {
|
||||
let textSize = self.textNode.updateLayout(CGSize(width: constrainedSize.width - 20.0, height: .greatestFiniteMagnitude))
|
||||
|
||||
let topInset: CGFloat = 16.0
|
||||
@@ -105,10 +105,9 @@ private final class ChannelDiscussionGroupActionSheetItemNode: ActionSheetItemNo
|
||||
|
||||
self.textNode.frame = CGRect(origin: CGPoint(x: floor((constrainedSize.width - textSize.width) / 2.0), y: topInset + avatarSize + textSpacing), size: textSize)
|
||||
|
||||
return CGSize(width: constrainedSize.width, height: topInset + avatarSize + textSpacing + textSize.height + bottomInset)
|
||||
}
|
||||
|
||||
override func layout() {
|
||||
super.layout()
|
||||
let size = CGSize(width: constrainedSize.width, height: topInset + avatarSize + textSpacing + textSize.height + bottomInset)
|
||||
|
||||
self.updateInternalLayout(size)
|
||||
return size
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user