diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 7f9d30e05b..6e54bf2fba 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -8721,3 +8721,6 @@ Sorry for the inconvenience."; "AvatarEditor.SetChannelPhoto" = "Set as Group Photo"; "AvatarEditor.Set" = "Set"; + +"Premium.Emoji.Description" = "Unlock this emoji and many more by subscribing to Telegram Premium."; +"Premium.Emoji.Proceed" = "Unlock Premium Emoji"; diff --git a/submodules/StickerPeekUI/Sources/StickerPreviewPeekContent.swift b/submodules/StickerPeekUI/Sources/StickerPreviewPeekContent.swift index e629c476d9..26a569fe15 100644 --- a/submodules/StickerPeekUI/Sources/StickerPreviewPeekContent.swift +++ b/submodules/StickerPeekUI/Sources/StickerPreviewPeekContent.swift @@ -73,7 +73,9 @@ public final class StickerPreviewPeekContent: PeekControllerContent { public func fullScreenAccessoryNode(blurView: UIVisualEffectView) -> (PeekControllerAccessoryNode & ASDisplayNode)? { if self.isLocked { - return PremiumStickerPackAccessoryNode(theme: self.theme, strings: self.strings, proceed: self.openPremiumIntro) + let isEmoji = self.item.file.isCustomEmoji + + return PremiumStickerPackAccessoryNode(theme: self.theme, strings: self.strings, isEmoji: isEmoji, proceed: self.openPremiumIntro) } else { return nil } @@ -266,17 +268,17 @@ final class PremiumStickerPackAccessoryNode: SparseNode, PeekControllerAccessory let proceedButton: SolidRoundedButtonNode let cancelButton: HighlightableButtonNode - init(theme: PresentationTheme, strings: PresentationStrings, proceed: @escaping () -> Void) { + init(theme: PresentationTheme, strings: PresentationStrings, isEmoji: Bool, proceed: @escaping () -> Void) { self.proceed = proceed self.textNode = ImmediateTextNode() self.textNode.displaysAsynchronously = false self.textNode.textAlignment = .center self.textNode.maximumNumberOfLines = 0 - self.textNode.attributedText = NSAttributedString(string: strings.Premium_Stickers_Description, font: Font.regular(17.0), textColor: theme.actionSheet.secondaryTextColor) + self.textNode.attributedText = NSAttributedString(string: isEmoji ? strings.Premium_Stickers_Description : strings.Premium_Stickers_Description, font: Font.regular(17.0), textColor: theme.actionSheet.secondaryTextColor) self.textNode.lineSpacing = 0.1 - self.proceedButton = SolidRoundedButtonNode(title: strings.Premium_Stickers_Proceed, theme: SolidRoundedButtonTheme( + self.proceedButton = SolidRoundedButtonNode(title: isEmoji ? strings.Premium_Emoji_Proceed: strings.Premium_Stickers_Proceed, theme: SolidRoundedButtonTheme( backgroundColor: .white, backgroundColors: [ UIColor(rgb: 0x0077ff), diff --git a/submodules/TelegramUI/Components/ChatEntityKeyboardInputNode/Sources/ChatEntityKeyboardInputNode.swift b/submodules/TelegramUI/Components/ChatEntityKeyboardInputNode/Sources/ChatEntityKeyboardInputNode.swift index faf7f4f604..4cb7a12060 100644 --- a/submodules/TelegramUI/Components/ChatEntityKeyboardInputNode/Sources/ChatEntityKeyboardInputNode.swift +++ b/submodules/TelegramUI/Components/ChatEntityKeyboardInputNode/Sources/ChatEntityKeyboardInputNode.swift @@ -2217,7 +2217,7 @@ public final class EmojiContentPeekBehaviorImpl: EmojiContentPeekBehavior { interaction.copyEmoji(file) } - if let _ = strongSelf.chatPeerId, !isLocked { + if let _ = strongSelf.chatPeerId { //TODO:localize menuItems.append(.action(ContextMenuActionItem(text: "Send Emoji", icon: { theme in if let image = generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Download"), color: theme.actionSheet.primaryTextColor) { diff --git a/submodules/TelegramUI/Components/EmojiStatusSelectionComponent/Sources/EmojiStatusSelectionComponent.swift b/submodules/TelegramUI/Components/EmojiStatusSelectionComponent/Sources/EmojiStatusSelectionComponent.swift index 5a20d1904a..6fbceaec17 100644 --- a/submodules/TelegramUI/Components/EmojiStatusSelectionComponent/Sources/EmojiStatusSelectionComponent.swift +++ b/submodules/TelegramUI/Components/EmojiStatusSelectionComponent/Sources/EmojiStatusSelectionComponent.swift @@ -812,7 +812,8 @@ public final class EmojiStatusSelectionController: ViewController { cache: animationCache, renderer: animationRenderer, placeholderColor: UIColor(white: 0.0, alpha: 0.0), - pointSize: CGSize(width: 32.0, height: 32.0) + pointSize: CGSize(width: 32.0, height: 32.0), + dynamicColor: self.presentationData.theme.list.itemAccentColor ) switch item.tintMode { case .accent: diff --git a/submodules/TelegramUI/Components/EmojiSuggestionsComponent/Sources/EmojiSuggestionsComponent.swift b/submodules/TelegramUI/Components/EmojiSuggestionsComponent/Sources/EmojiSuggestionsComponent.swift index cf1c08aa50..a93adb17bc 100644 --- a/submodules/TelegramUI/Components/EmojiSuggestionsComponent/Sources/EmojiSuggestionsComponent.swift +++ b/submodules/TelegramUI/Components/EmojiSuggestionsComponent/Sources/EmojiSuggestionsComponent.swift @@ -281,6 +281,7 @@ public final class EmojiSuggestionsComponent: Component { let itemLayer: InlineStickerItemLayer if let current = self.visibleLayers[item.fileId] { itemLayer = current + itemLayer.dynamicColor = component.theme.list.itemPrimaryTextColor } else { itemLayer = InlineStickerItemLayer( context: component.context, @@ -291,7 +292,8 @@ public final class EmojiSuggestionsComponent: Component { cache: component.animationCache, renderer: component.animationRenderer, placeholderColor: component.theme.list.mediaPlaceholderColor, - pointSize: itemFrame.size + pointSize: itemFrame.size, + dynamicColor: component.theme.list.itemPrimaryTextColor ) self.visibleLayers[item.fileId] = itemLayer self.scrollView.layer.addSublayer(itemLayer) diff --git a/submodules/TelegramUI/Sources/EmojisChatInputPanelItem.swift b/submodules/TelegramUI/Sources/EmojisChatInputPanelItem.swift index 842d3266d1..7bd6a012c9 100644 --- a/submodules/TelegramUI/Sources/EmojisChatInputPanelItem.swift +++ b/submodules/TelegramUI/Sources/EmojisChatInputPanelItem.swift @@ -157,6 +157,8 @@ final class EmojisChatInputPanelItemNode: ListViewItemNode { emojiView.center = emojiFrame.center emojiView.bounds = CGRect(origin: CGPoint(), size: emojiFrame.size) } + + emojiView.updateTextColor(item.theme.list.itemPrimaryTextColor) } else { strongSelf.symbolNode.isHidden = false