From 29fb65d33d2d9a3252846e9ee01a2ec64c384be1 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Sat, 15 Nov 2025 02:33:37 +0400 Subject: [PATCH] Various improvements --- .../Sources/GiftAuctionBidScreen.swift | 8 +++++--- .../Sources/GiftViewScreen.swift | 20 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftAuctionBidScreen.swift b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftAuctionBidScreen.swift index 3efbd7fb31..fb61d0f35f 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftAuctionBidScreen.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftAuctionBidScreen.swift @@ -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 } diff --git a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift index 420eacaf68..3dd6d8ced1 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift @@ -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 = "" }