From 5eb789a018ca906ab33d8327a5109c492b28af86 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Sun, 5 Jun 2022 19:52:14 +0400 Subject: [PATCH] Various fixes --- Telegram/Telegram-iOS/en.lproj/Localizable.strings | 11 +++++++++++ .../Sources/ChatMessageAnimatedStickerItemNode.swift | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 7e53e38a3c..11e50be953 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -7568,20 +7568,31 @@ Sorry for the inconvenience."; "Premium.IncreaseLimit" = "Increase Limit"; "Premium.MaxFoldersCountText" = "You have reached the limit of **%1$@** folders. You can double the limit to **%2$@** folders by subscribing to **Telegram Premium**."; +"Premium.MaxFoldersCountNoPremiumText" = "You have reached the limit of **%1$@** folders. We are working to let you increase this limit in the future."; "Premium.MaxFoldersCountFinalText" = "Sorry, you can't create more than **%1$@** folders."; + "Premium.MaxChatsInFolderText" = "Sorry, you can't add more than **%1$@** chats to a folder. You can increase this limit to **%2$@** by upgrading to **Telegram Premium**."; +"Premium.MaxChatsInFolderNoPremiumText" = "Sorry, you can't add more than **%1$@** chats to a folder. We are working to let you increase this limit in the future."; "Premium.MaxChatsInFolderFinalText" = "Sorry, you can't add more than **%@** chats to a folder."; + "Premium.MaxFileSizeText" = "Double this limit to %@ per file by subscribing to **Telegram Premium**."; +"Premium.MaxFileSizeNoPremiumText" = "The document can't be sent, because it is larger than **%@**. We are working to let you increase this limit in the future."; "Premium.MaxFileSizeFinalText" = "The document can't be sent, because it is larger than **%@**."; + "Premium.MaxPinsText" = "Sorry, you can't pin more than **%1$@** chats to the top. Unpin some of the currently pinned ones or subscribe to **Telegram Premium** to double the limit to **%2$@** chats."; +"Premium.MaxPinsNoPremiumText" = "Sorry, you can't pin more than **%@** chats to the top. Unpin some of the currently pinned ones."; "Premium.MaxPinsFinalText" = "Sorry, you can't pin more than **%@** chats to the top. Unpin some of the currently pinned ones."; + "Premium.MaxFavedStickersTitle" = "The Limit of %@ Stickers Reached"; "Premium.MaxFavedStickersText" = "An older sticker was replaced with this one. You can [increase the limit]() to %@ stickers."; "Premium.MaxFavedStickersFinalText" = "An older sticker was replaced with this one."; + "Premium.MaxSavedGifsTitle" = "The Limit of %@ GIFs Reached"; "Premium.MaxSavedGifsText" = "An older GIF was replaced with this one. You can [increase the limit]() to %@ GIFS."; "Premium.MaxSavedGifsFinalText" = "An older GIF was replaced with this one."; + "Premium.MaxAccountsText" = "You have reached the limit of **%@** connected accounts. You can free one place by subscribing to **Telegram Premium**."; +"Premium.MaxAccountsNoPremiumText" = "You have reached the limit of **%@** connected accounts."; "Premium.MaxAccountsFinalText" = "You have reached the limit of **%@** connected accounts."; "Premium.Free" = "Free"; diff --git a/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift b/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift index 66f66f1be0..5612b26d4b 100644 --- a/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift +++ b/submodules/TelegramUI/Sources/ChatMessageAnimatedStickerItemNode.swift @@ -1172,6 +1172,13 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView { strongSelf.animationNode?.frame = animationNodeFrame if let animationNode = strongSelf.animationNode as? AnimatedStickerNode { animationNode.updateLayout(size: updatedContentFrame.insetBy(dx: imageInset, dy: imageInset).size) + + if let file = file, file.isPremiumSticker && incoming { + let mirroredTransform = CATransform3DMakeScale(-1.0, 1.0, 1.0) + strongSelf.imageNode.transform = mirroredTransform + animationNode.transform = mirroredTransform + strongSelf.placeholderNode.transform = mirroredTransform + } } } @@ -1643,9 +1650,6 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView { if isStickerEffect { let scale: CGFloat = 0.245 animationFrame = animationNode.frame.offsetBy(dx: incomingMessage ? animationNode.frame.width * scale : -animationNode.frame.width * scale + 21.0, dy: -1.0).insetBy(dx: -animationNode.frame.width * scale, dy: -animationNode.frame.height * scale) - if incomingMessage { - animationNode.transform = CATransform3DMakeScale(-1.0, 1.0, 1.0) - } } else { animationFrame = animationNode.frame.insetBy(dx: -animationNode.frame.width, dy: -animationNode.frame.height) .offsetBy(dx: incomingMessage ? animationNode.frame.width - 10.0 : -animationNode.frame.width + 10.0, dy: 0.0)