mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
6d1732d830
commit
c6718b3a5e
@ -2326,9 +2326,9 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
||||
self.backgroundBannerView.addSubview(backgroundCoverView)
|
||||
}
|
||||
if additive {
|
||||
transition.updateFrameAdditive(view: backgroundCoverView, frame: CGRect(origin: CGPoint(x: -bannerInset, y: bannerFrame.height - backgroundCoverSize.height - bannerInset), size: backgroundCoverSize))
|
||||
transition.updateFrameAdditive(view: backgroundCoverView, frame: CGRect(origin: CGPoint(x: -bannerInset, y: bannerFrame.height - backgroundCoverSize.height), size: backgroundCoverSize))
|
||||
} else {
|
||||
transition.updateFrame(view: backgroundCoverView, frame: CGRect(origin: CGPoint(x: -bannerInset, y: bannerFrame.height - backgroundCoverSize.height - bannerInset), size: backgroundCoverSize))
|
||||
transition.updateFrame(view: backgroundCoverView, frame: CGRect(origin: CGPoint(x: -bannerInset, y: bannerFrame.height - backgroundCoverSize.height), size: backgroundCoverSize))
|
||||
}
|
||||
if backgroundCoverAnimateIn {
|
||||
if !self.isAvatarExpanded {
|
||||
|
@ -379,7 +379,7 @@ public final class PeerInfoGiftsPaneNode: ASDisplayNode, PeerInfoPaneNode, UIScr
|
||||
let optionSpacing: CGFloat = 10.0
|
||||
let itemsSideInset = params.sideInset + 16.0
|
||||
|
||||
let defaultItemsInRow = params.size.width > params.size.height || params.size.width > 414.0 ? 5 : 3
|
||||
let defaultItemsInRow = params.size.width > params.size.height || params.size.width > 480.0 ? 5 : 3
|
||||
let itemsInRow = max(1, min(starsProducts.count, defaultItemsInRow))
|
||||
let defaultOptionWidth = (params.size.width - itemsSideInset * 2.0 - optionSpacing * CGFloat(defaultItemsInRow - 1)) / CGFloat(defaultItemsInRow)
|
||||
let optionWidth = (params.size.width - itemsSideInset * 2.0 - optionSpacing * CGFloat(itemsInRow - 1)) / CGFloat(itemsInRow)
|
||||
|
@ -218,8 +218,16 @@ private final class WebAppLaunchConfirmationAlertContentNode: AlertContentNode {
|
||||
let titleSize = self.titleNode.updateLayout(CGSize(width: size.width - 32.0, height: size.height))
|
||||
var totalWidth = titleSize.width
|
||||
|
||||
if self.peer.isVerified {
|
||||
let statusContent: EmojiStatusComponent.Content = .verified(fillColor: self.presentationTheme.list.itemCheckColors.fillColor, foregroundColor: self.presentationTheme.list.itemCheckColors.foregroundColor, sizeType: .large)
|
||||
var statusContent: EmojiStatusComponent.Content?
|
||||
if self.peer.isScam {
|
||||
statusContent = .text(color: self.presentationTheme.list.itemDestructiveColor, string: self.strings.Message_ScamAccount.uppercased())
|
||||
} else if self.peer.isFake {
|
||||
statusContent = .text(color: self.presentationTheme.list.itemDestructiveColor, string: self.strings.Message_FakeAccount.uppercased())
|
||||
} else if self.peer.isVerified {
|
||||
statusContent = .verified(fillColor: self.presentationTheme.list.itemCheckColors.fillColor, foregroundColor: self.presentationTheme.list.itemCheckColors.foregroundColor, sizeType: .large)
|
||||
}
|
||||
|
||||
if let statusContent {
|
||||
let titleCredibilityIconTransition: ComponentTransition = .immediate
|
||||
|
||||
let titleCredibilityIconView: ComponentHostView<Empty>
|
||||
@ -247,7 +255,6 @@ private final class WebAppLaunchConfirmationAlertContentNode: AlertContentNode {
|
||||
)
|
||||
|
||||
totalWidth += titleIconSize.width + 2.0
|
||||
|
||||
titleCredibilityIconTransition.setFrame(view: titleCredibilityIconView, frame: CGRect(origin: CGPoint(x:floorToScreenPixels((size.width - totalWidth) / 2.0) + titleSize.width + 2.0, y: origin.y), size: titleIconSize))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user