mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-22 13:34:44 +00:00
UI improvements
This commit is contained in:
parent
a754bae7d8
commit
8e3cc09e56
@ -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";
|
||||
|
@ -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),
|
||||
|
@ -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) {
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user