mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various improvements
This commit is contained in:
parent
a443df81dd
commit
29fb65d33d
2 changed files with 20 additions and 8 deletions
|
|
@ -1599,11 +1599,13 @@ private final class GiftAuctionBidScreenComponent: Component {
|
|||
controller?.present(
|
||||
UndoOverlayController(
|
||||
presentationData: presentationData,
|
||||
content: .actionSucceeded(
|
||||
content: .universalImage(
|
||||
image: generateTintedImage(image: UIImage(bundleImageName: "Premium/Auction/BidMedium"), color: .white)!,
|
||||
size: nil,
|
||||
title: title,
|
||||
text: text,
|
||||
cancel: nil,
|
||||
destructive: false
|
||||
customUndoText: nil,
|
||||
timeout: nil
|
||||
),
|
||||
position: .bottom,
|
||||
action: { _ in return true }
|
||||
|
|
|
|||
|
|
@ -3345,12 +3345,22 @@ private final class GiftViewSheetContent: CombinedComponent {
|
|||
let hiddenDescription: String
|
||||
if incoming {
|
||||
hiddenDescription = text != nil ? strings.Gift_View_NameAndMessageHidden : strings.Gift_View_NameHidden
|
||||
} else if let peerId = subject.arguments?.peerId, let peer = state.peerMap[peerId], subject.arguments?.fromPeerId != nil {
|
||||
var peerName = peer.compactDisplayTitle
|
||||
if peerName.count > 30 {
|
||||
peerName = "\(peerName.prefix(30))…"
|
||||
} else if subject.arguments?.fromPeerId != nil {
|
||||
var recipientPeerId: EnginePeer.Id?
|
||||
if let toPeerId = subject.arguments?.auctionToPeerId {
|
||||
recipientPeerId = toPeerId
|
||||
} else if let peerId = subject.arguments?.peerId {
|
||||
recipientPeerId = peerId
|
||||
}
|
||||
if let recipientPeerId, let peer = state.peerMap[recipientPeerId] {
|
||||
var peerName = peer.compactDisplayTitle
|
||||
if peerName.count > 30 {
|
||||
peerName = "\(peerName.prefix(30))…"
|
||||
}
|
||||
hiddenDescription = text != nil ? strings.Gift_View_Outgoing_NameAndMessageHidden(peerName).string : strings.Gift_View_Outgoing_NameHidden(peerName).string
|
||||
} else {
|
||||
hiddenDescription = ""
|
||||
}
|
||||
hiddenDescription = text != nil ? strings.Gift_View_Outgoing_NameAndMessageHidden(peerName).string : strings.Gift_View_Outgoing_NameHidden(peerName).string
|
||||
} else {
|
||||
hiddenDescription = ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue