mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix build
This commit is contained in:
parent
deb549bd95
commit
b8bf673c5f
2 changed files with 2 additions and 12 deletions
|
|
@ -450,7 +450,7 @@ final class ContactsControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
|
|||
let edgeEffectHeight: CGFloat = layout.intrinsicInsets.bottom
|
||||
let edgeEffectFrame = CGRect(origin: CGPoint(x: 0.0, y: layout.size.height - edgeEffectHeight), size: CGSize(width: layout.size.width, height: edgeEffectHeight))
|
||||
transition.updateFrame(view: self.edgeEffectView, frame: edgeEffectFrame)
|
||||
self.edgeEffectView.update(content: self.presentationData.theme.list.plainBackgroundColor, isInverted: false, rect: edgeEffectFrame, edge: .bottom, edgeSize: edgeEffectFrame.height, containerSize: layout.size, transition: ComponentTransition(transition))
|
||||
self.edgeEffectView.update(content: self.presentationData.theme.list.plainBackgroundColor, rect: edgeEffectFrame, edge: .bottom, edgeSize: edgeEffectFrame.height, transition: ComponentTransition(transition))
|
||||
|
||||
self.updateNavigationScrolling(transition: transition)
|
||||
|
||||
|
|
|
|||
|
|
@ -3347,23 +3347,13 @@ private final class GiftViewSheetContent: CombinedComponent {
|
|||
case let .address(address):
|
||||
exported = true
|
||||
|
||||
func formatAddress(_ str: String) -> String {
|
||||
guard str.count == 48 && !str.hasSuffix(".ton") else {
|
||||
return str
|
||||
}
|
||||
var result = str
|
||||
let middleIndex = result.index(result.startIndex, offsetBy: str.count / 2)
|
||||
result.insert("\n", at: middleIndex)
|
||||
return result
|
||||
}
|
||||
|
||||
tableItems.append(.init(
|
||||
id: "address_owner",
|
||||
title: strings.Gift_Unique_Owner,
|
||||
component: AnyComponent(
|
||||
Button(
|
||||
content: AnyComponent(
|
||||
MultilineTextComponent(text: .plain(NSAttributedString(string: formatAddress(address), font: tableLargeMonospaceFont, textColor: tableLinkColor)), maximumNumberOfLines: 2, lineSpacing: 0.2)
|
||||
MultilineTextComponent(text: .plain(NSAttributedString(string: address, font: tableLargeMonospaceFont, textColor: tableLinkColor)), truncationType: .middle, maximumNumberOfLines: 1, lineSpacing: 0.2)
|
||||
),
|
||||
action: { [weak state] in
|
||||
state?.copyAddress(address)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue