From bc3612587bd0d9275bddbc93a85ca8415fc8101a Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 27 Mar 2026 11:13:25 +0100 Subject: [PATCH] Various fixes --- Telegram/Telegram-iOS/en.lproj/Localizable.strings | 4 ++-- .../Sources/ChatMessagePollBubbleContentNode.swift | 2 +- .../Sources/ContextControllerActionsStackNode.swift | 2 +- .../Sources/Chat/ChatControllerOpenPollContextMenu.swift | 6 +++++- .../TelegramUI/Sources/OverlayAudioPlayerControlsNode.swift | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index aaa0b1c611..50a9a03c03 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -16018,7 +16018,7 @@ Error: %8$@"; "PeerInfo.PanePolls" = "Polls"; -"MediaPlayer.SavedMusic.RemoveFromProfile" = "Remove from Profile"; +"MediaPlayer.SavedMusic.RemoveFromProfileShort" = "Remove from Profile"; "Gift.Store.ShowStarsListings" = "Show listings for stars only"; "Gift.Store.AllListings" = "All Listings"; @@ -16054,7 +16054,7 @@ Error: %8$@"; "MediaPicker.PollSubtitle.PollOption" = "Add media to this option"; "StickerPicker.Title" = "Sticker"; -"StickerPicker.PollSubtitle.PollOption" = "Add media to this option"; +"StickerPicker.PollSubtitle.PollOption" = "Add sticker to this option"; "Chat.Poll.HiddenResultsTooltip" = "Results will appear after the poll ends"; diff --git a/submodules/TelegramUI/Components/Chat/ChatMessagePollBubbleContentNode/Sources/ChatMessagePollBubbleContentNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessagePollBubbleContentNode/Sources/ChatMessagePollBubbleContentNode.swift index 54cc03685a..e5fc326947 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessagePollBubbleContentNode/Sources/ChatMessagePollBubbleContentNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessagePollBubbleContentNode/Sources/ChatMessagePollBubbleContentNode.swift @@ -2338,7 +2338,7 @@ public class ChatMessagePollBubbleContentNode: ChatMessageBubbleContentNode { item.controllerInteraction.requestAddMessagePollOption(item.message.id, trimmedNewOptionText, entities, optionData, self.currentNewOptionMedia?.media) return } else if self.newOptionIsFocused { - return + self.addOptionNode?.resignInput() } var hasSelection = false diff --git a/submodules/TelegramUI/Components/ContextControllerImpl/Sources/ContextControllerActionsStackNode.swift b/submodules/TelegramUI/Components/ContextControllerImpl/Sources/ContextControllerActionsStackNode.swift index 5ff115f2f1..5a2e9e81c7 100644 --- a/submodules/TelegramUI/Components/ContextControllerImpl/Sources/ContextControllerActionsStackNode.swift +++ b/submodules/TelegramUI/Components/ContextControllerImpl/Sources/ContextControllerActionsStackNode.swift @@ -528,7 +528,7 @@ public final class ContextControllerActionsListActionItemNode: HighlightTracking component: AnyComponent( BalancedTextComponent( text: .plain(balanceTitleAttributedText), - maximumNumberOfLines: 2 + maximumNumberOfLines: 3 ) ), environment: {}, diff --git a/submodules/TelegramUI/Sources/Chat/ChatControllerOpenPollContextMenu.swift b/submodules/TelegramUI/Sources/Chat/ChatControllerOpenPollContextMenu.swift index f9e380ae1e..7d9eca234f 100644 --- a/submodules/TelegramUI/Sources/Chat/ChatControllerOpenPollContextMenu.swift +++ b/submodules/TelegramUI/Sources/Chat/ChatControllerOpenPollContextMenu.swift @@ -187,7 +187,11 @@ extension ChatControllerImpl { items.append(.separator) - let peerName = "**\(addedByPeer.compactDisplayTitle)**" + var peerName = addedByPeer.compactDisplayTitle + if peerName.count > 20 { + peerName = peerName.prefix(20) + "..." + } + peerName = "**\(peerName)**" let dateText = humanReadableStringForTimestamp(strings: self.presentationData.strings, dateTimeFormat: self.presentationData.dateTimeFormat, timestamp: date, alwaysShowTime: true, allowYesterday: true, format: HumanReadableStringFormat( dateFormatString: { value in if addedByPeer.id == self.context.account.peerId { diff --git a/submodules/TelegramUI/Sources/OverlayAudioPlayerControlsNode.swift b/submodules/TelegramUI/Sources/OverlayAudioPlayerControlsNode.swift index 1fd90a3158..1f33852b61 100644 --- a/submodules/TelegramUI/Sources/OverlayAudioPlayerControlsNode.swift +++ b/submodules/TelegramUI/Sources/OverlayAudioPlayerControlsNode.swift @@ -1007,7 +1007,7 @@ final class OverlayAudioPlayerControlsNode: ASDisplayNode { var buttonBackgroundColor = self.presentationData.theme.list.itemCheckColors.fillColor if savedMusic { profileAudioButtonContent = AnyComponentWithIdentity(id: "removeFromProfile", component: AnyComponent( - MultilineTextComponent(text: .plain(NSAttributedString(string: self.presentationData.strings.MediaPlayer_SavedMusic_RemoveFromProfile, font: Font.semibold(17.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor))) + MultilineTextComponent(text: .plain(NSAttributedString(string: self.presentationData.strings.MediaPlayer_SavedMusic_RemoveFromProfileShort, font: Font.semibold(17.0), textColor: self.presentationData.theme.list.itemPrimaryTextColor))) )) buttonBackgroundColor = self.presentationData.theme.list.controlSecondaryColor } else {