diff --git a/submodules/TelegramCallsUI/Sources/Components/MediaStreamComponent.swift b/submodules/TelegramCallsUI/Sources/Components/MediaStreamComponent.swift index 8286436ac9..553f2bf350 100644 --- a/submodules/TelegramCallsUI/Sources/Components/MediaStreamComponent.swift +++ b/submodules/TelegramCallsUI/Sources/Components/MediaStreamComponent.swift @@ -1997,7 +1997,7 @@ final class RoundGradientButtonComponent: Component { final class View: UIView { let gradientLayer = CAGradientLayer() let iconView = UIImageView() - let titleLabel = UILabel() + let titleLabel = ComponentView() override init(frame: CGRect = .zero) { super.init(frame: frame) @@ -2009,27 +2009,43 @@ final class RoundGradientButtonComponent: Component { self.layer.addSublayer(gradientLayer) self.addSubview(iconView) self.clipsToBounds = false - - self.addSubview(titleLabel) - titleLabel.textAlignment = .center - iconView.contentMode = .scaleAspectFit - titleLabel.font = .systemFont(ofSize: 13) - titleLabel.textColor = .white } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } - override func layoutSubviews() { - super.layoutSubviews() - titleLabel.invalidateIntrinsicContentSize() - let heightForIcon = bounds.height - max(round(titleLabel.intrinsicContentSize.height), 12) - 8.0 - iconView.frame = .init(x: bounds.midX - heightForIcon / 2, y: 0, width: heightForIcon, height: heightForIcon) - gradientLayer.masksToBounds = true - gradientLayer.cornerRadius = min(iconView.frame.width, iconView.frame.height) / 2 - gradientLayer.frame = iconView.frame - titleLabel.frame = .init(x: 0, y: bounds.height - titleLabel.intrinsicContentSize.height, width: bounds.width, height: titleLabel.intrinsicContentSize.height) + func update(component: RoundGradientButtonComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment, transition: Transition) -> CGSize { + self.iconView.image = component.image ?? component.icon.flatMap { UIImage(bundleImageName: $0) } + let gradientColors: [CGColor] + if component.gradientColors.count == 1 { + gradientColors = [component.gradientColors[0], component.gradientColors[0]] + } else { + gradientColors = component.gradientColors + } + self.gradientLayer.colors = gradientColors + + let titleSize = self.titleLabel.update( + transition: .immediate, + component: AnyComponent(Text(text: component.title, font: Font.regular(13.0), color: .white)), + environment: {}, + containerSize: CGSize(width: 100.0, height: 100.0) + ) + + let heightForIcon = availableSize.height - max(round(titleSize.height), 12) - 8.0 + self.iconView.frame = .init(x: availableSize.width * 0.5 - heightForIcon / 2, y: 0, width: heightForIcon, height: heightForIcon) + self.gradientLayer.masksToBounds = true + self.gradientLayer.cornerRadius = min(self.iconView.frame.width, self.iconView.frame.height) / 2 + self.gradientLayer.frame = self.iconView.frame + + if let titleView = self.titleLabel.view { + if titleView.superview == nil { + self.addSubview(titleView) + } + titleView.frame = CGRect(origin: CGPoint(x: floor((availableSize.width - titleSize.width) * 0.5), y: availableSize.height - titleSize.height), size: titleSize) + } + + return availableSize } } @@ -2038,17 +2054,7 @@ final class RoundGradientButtonComponent: Component { } func update(view: View, availableSize: CGSize, state: EmptyComponentState, environment: Environment, transition: Transition) -> CGSize { - view.iconView.image = image ?? icon.flatMap { UIImage(bundleImageName: $0) } - let gradientColors: [CGColor] - if self.gradientColors.count == 1 { - gradientColors = [self.gradientColors[0], self.gradientColors[0]] - } else { - gradientColors = self.gradientColors - } - view.gradientLayer.colors = gradientColors - view.titleLabel.text = title - view.setNeedsLayout() - return availableSize + return view.update(component: self, availableSize: availableSize, state: state, environment: environment, transition: transition) } } diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageAttachedContentNode/Sources/ChatMessageAttachedContentNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageAttachedContentNode/Sources/ChatMessageAttachedContentNode.swift index 8e1f2e7b09..1924502961 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageAttachedContentNode/Sources/ChatMessageAttachedContentNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageAttachedContentNode/Sources/ChatMessageAttachedContentNode.swift @@ -146,6 +146,7 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { let makeSubtitleLayout = TextNodeWithEntities.asyncLayout(self.subtitle) let makeTextLayout = TextNodeWithEntities.asyncLayout(self.text) let makeContentMedia = ChatMessageInteractiveMediaNode.asyncLayout(self.contentMedia) + let makeContentFile = ChatMessageInteractiveFileNode.asyncLayout(self.contentFile) let makeActionButtonLayout = ChatMessageAttachedContentButtonNode.asyncLayout(self.actionButton) let makeStatusLayout = self.statusNode.asyncLayout() @@ -299,7 +300,6 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { var maxWidth: CGFloat = .greatestFiniteMagnitude let contentMediaContinueLayout: ((CGSize, Bool, Bool, ImageCorners) -> (CGFloat, (CGFloat) -> (CGSize, (ListViewItemUpdateAnimation, Bool) -> ChatMessageInteractiveMediaNode)))? - let inlineMediaAndSize: (TelegramMediaImage, CGSize)? if let contentMediaValue { @@ -340,7 +340,37 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { inlineMediaAndSize = nil } - let _ = contentFileValue + let contentFileContinueLayout: ChatMessageInteractiveFileNode.ContinueLayout? + if let contentFileValue { + let automaticDownload = shouldDownloadMediaAutomatically(settings: automaticDownloadSettings, peerType: associatedData.automaticDownloadPeerType, networkType: associatedData.automaticDownloadNetworkType, authorPeerId: message.author?.id, contactsPeerIds: associatedData.contactsPeerIds, media: contentFileValue) + + let (_, refineLayout) = makeContentFile(ChatMessageInteractiveFileNode.Arguments( + context: context, + presentationData: presentationData, + message: message, + topMessage: message, + associatedData: associatedData, + chatLocation: chatLocation, + attributes: attributes, + isPinned: message.tags.contains(.pinned) && !associatedData.isInPinnedListMode && !isReplyThread, + forcedIsEdited: false, + file: contentFileValue, + automaticDownload: automaticDownload, + incoming: incoming, + isRecentActions: false, + forcedResourceStatus: associatedData.forcedResourceStatus, + dateAndStatusType: nil, + displayReactions: false, + messageSelection: nil, + isAttachedContentBlock: true, + layoutConstants: layoutConstants, + constrainedSize: CGSize(width: constrainedSize.width - insets.left - insets.right, height: constrainedSize.height), + controllerInteraction: controllerInteraction + )) + contentFileContinueLayout = refineLayout + } else { + contentFileContinueLayout = nil + } return (maxWidth, { constrainedSize, position in enum ContentLayoutOrderItem { @@ -348,6 +378,7 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { case subtitle case text case media + case file case actionButton } var contentLayoutOrder: [ContentLayoutOrderItem] = [] @@ -378,6 +409,9 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { contentLayoutOrder.append(.media) } } + if contentFileContinueLayout != nil { + contentLayoutOrder.append(.file) + } if !isPreview, actionTitle != nil { contentLayoutOrder.append(.actionButton) } @@ -440,7 +474,7 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { remainingCutoutHeight -= textLayoutAndApplyValue.0.size.height } - case .media, .actionButton: + case .media, .file, .actionButton: break } } @@ -506,6 +540,15 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { contentMediaFinalizeLayout = nil } + let contentFileFinalizeLayout: ChatMessageInteractiveFileNode.FinalizeLayout? + if let contentFileContinueLayout { + let (refinedWidth, finalizeFileLayout) = contentFileContinueLayout(CGSize(width: constrainedSize.width, height: constrainedSize.height)) + actualWidth = max(actualWidth, refinedWidth) + contentFileFinalizeLayout = finalizeFileLayout + } else { + contentFileFinalizeLayout = nil + } + var edited = false if attributes.updatingMedia != nil { edited = true @@ -588,6 +631,14 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { contentMediaSizeAndApply = nil } + let contentFileSizeAndApply: (CGSize, ChatMessageInteractiveFileNode.Apply)? + if let contentFileFinalizeLayout { + let (size, apply) = contentFileFinalizeLayout(resultingWidth - insets.left - insets.right) + contentFileSizeAndApply = (size, apply) + } else { + contentFileSizeAndApply = nil + } + let actionButtonSizeAndApply: ((CGSize, (ListViewItemUpdateAnimation) -> ChatMessageAttachedContentButtonNode))? if let (_, actionButtonFinalizeLayout) = actionButtonMinWidthAndFinalizeLayout { let (size, apply) = actionButtonFinalizeLayout(resultingWidth - insets.left - insets.right, 36.0) @@ -627,7 +678,7 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { if let (titleLayout, _) = titleLayoutAndApply { if i == 0 { actualSize.height += textTopSpacing - } else if contentLayoutOrder[i - 1] == .media { + } else if contentLayoutOrder[i - 1] == .media || contentLayoutOrder[i - 1] == .file { actualSize.height += textContentMediaSpacing } @@ -644,7 +695,7 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { actualSize.height += textTopSpacing } else if contentLayoutOrder[i - 1] == .title { actualSize.height += titleTextSpacing - } else if contentLayoutOrder[i - 1] == .media { + } else if contentLayoutOrder[i - 1] == .media || contentLayoutOrder[i - 1] == .file { actualSize.height += textContentMediaSpacing } @@ -661,7 +712,7 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { actualSize.height += textTopSpacing } else if contentLayoutOrder[i - 1] == .title || contentLayoutOrder[i - 1] == .subtitle { actualSize.height += titleTextSpacing - } else if contentLayoutOrder[i - 1] == .media { + } else if contentLayoutOrder[i - 1] == .media || contentLayoutOrder[i - 1] == .file { actualSize.height += textContentMediaSpacing } @@ -687,13 +738,28 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { actualSize.height += contentMediaSize.height } + case .file: + if let (contentFileSize, _) = contentFileSizeAndApply { + if i == 0 { + actualSize.height += contentMediaTopSpacing + } else if contentLayoutOrder[i - 1] == .title || contentLayoutOrder[i - 1] == .subtitle || contentLayoutOrder[i - 1] == .text { + actualSize.height += textContentMediaSpacing + } + + contentDisplayOrder.append(ContentDisplayOrderItem( + item: item, + offsetY: actualSize.height + )) + + actualSize.height += contentFileSize.height + } case .actionButton: if let (actionButtonSize, _) = actionButtonSizeAndApply { if i != 0 { switch contentLayoutOrder[i - 1] { case .title, .subtitle, .text: actualSize.height += textButtonSpacing - case .media: + case .media, .file: actualSize.height += contentMediaButtonSpacing default: break @@ -726,7 +792,7 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { actualSize.height = backgroundInsets.top + inlineMediaEdgeInset + inlineMediaSize.height + inlineMediaEdgeInset } } - case .media: + case .media, .file: actualSize.height += contentMediaBottomSpacing case .actionButton: actualSize.height += buttonBottomSpacing @@ -972,6 +1038,43 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode { } } + if let item = contentDisplayOrder.first(where: { $0.item == .file }), let (contentFileSize, contentFileApply) = contentFileSizeAndApply { + let contentFileFrame = CGRect(origin: CGPoint(x: insets.left, y: item.offsetY), size: contentFileSize) + + let contentFile = contentFileApply(synchronousLoads, animation, applyInfo) + if self.contentFile !== contentFile { + self.contentFile?.removeFromSupernode() + self.contentFile = contentFile + + contentFile.activateLocalContent = { [weak self] in + guard let self else { + return + } + self.openMedia?(.default) + } + contentFile.visibility = self.visibility != .none + + self.transformContainer.addSubnode(contentFile) + + contentFile.frame = contentFileFrame + + contentFile.alpha = 0.0 + animation.animator.updateAlpha(layer: contentFile.layer, alpha: 1.0, completion: nil) + animation.animator.animateScale(layer: contentFile.layer, from: 0.01, to: 1.0, completion: nil) + } else { + animation.animator.updateFrame(layer: contentFile.layer, frame: contentFileFrame, completion: nil) + } + } else { + if let contentFile = self.contentFile { + self.contentFile = nil + + animation.animator.updateAlpha(layer: contentFile.layer, alpha: 0.0, completion: nil) + animation.animator.updateScale(layer: contentFile.layer, scale: 0.01, completion: { [weak contentFile] _ in + contentFile?.removeFromSupernode() + }) + } + } + if let item = contentDisplayOrder.first(where: { $0.item == .actionButton }), let (actionButtonSize, actionButtonApply) = actionButtonSizeAndApply { let actionButtonFrame = CGRect(origin: CGPoint(x: insets.left, y: item.offsetY), size: actionButtonSize) diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageFileBubbleContentNode/Sources/ChatMessageFileBubbleContentNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageFileBubbleContentNode/Sources/ChatMessageFileBubbleContentNode.swift index 0d8d6a3f84..c5696f38f1 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageFileBubbleContentNode/Sources/ChatMessageFileBubbleContentNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageFileBubbleContentNode/Sources/ChatMessageFileBubbleContentNode.swift @@ -148,6 +148,7 @@ public class ChatMessageFileBubbleContentNode: ChatMessageBubbleContentNode { dateAndStatusType: statusType, displayReactions: true, messageSelection: item.message.groupingKey != nil ? selection : nil, + isAttachedContentBlock: false, layoutConstants: layoutConstants, constrainedSize: CGSize(width: constrainedSize.width - layoutConstants.file.bubbleInsets.left - layoutConstants.file.bubbleInsets.right, height: constrainedSize.height), controllerInteraction: item.controllerInteraction diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageInstantVideoBubbleContentNode/Sources/ChatMessageInstantVideoBubbleContentNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageInstantVideoBubbleContentNode/Sources/ChatMessageInstantVideoBubbleContentNode.swift index 2f6096b29a..bd2ffeee5f 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageInstantVideoBubbleContentNode/Sources/ChatMessageInstantVideoBubbleContentNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageInstantVideoBubbleContentNode/Sources/ChatMessageInstantVideoBubbleContentNode.swift @@ -234,6 +234,7 @@ public class ChatMessageInstantVideoBubbleContentNode: ChatMessageBubbleContentN dateAndStatusType: statusType, displayReactions: false, messageSelection: item.message.groupingKey != nil ? selection : nil, + isAttachedContentBlock: false, layoutConstants: layoutConstants, constrainedSize: CGSize(width: constrainedSize.width - layoutConstants.file.bubbleInsets.left - layoutConstants.file.bubbleInsets.right, height: constrainedSize.height), controllerInteraction: item.controllerInteraction diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveFileNode/Sources/ChatMessageInteractiveFileNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveFileNode/Sources/ChatMessageInteractiveFileNode.swift index 9cf63aaa82..fce4dd4a6d 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveFileNode/Sources/ChatMessageInteractiveFileNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageInteractiveFileNode/Sources/ChatMessageInteractiveFileNode.swift @@ -57,6 +57,7 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { public let dateAndStatusType: ChatMessageDateAndStatusType? public let displayReactions: Bool public let messageSelection: Bool? + public let isAttachedContentBlock: Bool public let layoutConstants: ChatMessageItemLayoutConstants public let constrainedSize: CGSize public let controllerInteraction: ChatControllerInteraction @@ -79,6 +80,7 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { dateAndStatusType: ChatMessageDateAndStatusType?, displayReactions: Bool, messageSelection: Bool?, + isAttachedContentBlock: Bool, layoutConstants: ChatMessageItemLayoutConstants, constrainedSize: CGSize, controllerInteraction: ChatControllerInteraction @@ -100,6 +102,7 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { self.dateAndStatusType = dateAndStatusType self.displayReactions = displayReactions self.messageSelection = messageSelection + self.isAttachedContentBlock = isAttachedContentBlock self.layoutConstants = layoutConstants self.constrainedSize = constrainedSize self.controllerInteraction = controllerInteraction @@ -745,7 +748,14 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { let controlAreaWidth: CGFloat if hasThumbnail { - let currentIconFrame = CGRect(origin: CGPoint(x: -1.0, y: -7.0), size: CGSize(width: 74.0, height: 74.0)) + let currentIconFrame: CGRect + if arguments.isAttachedContentBlock { + currentIconFrame = CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: CGSize(width: 59.0, height: 59.0)) + controlAreaWidth = 71.0 + } else { + currentIconFrame = CGRect(origin: CGPoint(x: -1.0, y: -7.0), size: CGSize(width: 74.0, height: 74.0)) + controlAreaWidth = 86.0 + } iconFrame = currentIconFrame progressFrame = CGRect( origin: CGPoint( @@ -754,13 +764,20 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { ), size: CGSize(width: progressDiameter, height: progressDiameter) ) - controlAreaWidth = 86.0 } else { - progressFrame = CGRect( - origin: CGPoint(x: 3.0, y: isVoice ? -3.0 : 0.0), - size: CGSize(width: progressDiameter, height: progressDiameter) - ) - controlAreaWidth = progressFrame.maxX + 8.0 + if arguments.isAttachedContentBlock { + progressFrame = CGRect( + origin: CGPoint(x: 3.0, y: 0.0), + size: CGSize(width: progressDiameter, height: progressDiameter) + ) + controlAreaWidth = progressFrame.maxX + 8.0 + } else { + progressFrame = CGRect( + origin: CGPoint(x: 3.0, y: isVoice ? -3.0 : 0.0), + size: CGSize(width: progressDiameter, height: progressDiameter) + ) + controlAreaWidth = progressFrame.maxX + 8.0 + } } var statusSuggestedWidthAndContinue: (CGFloat, (CGFloat) -> (CGSize, (ListViewItemUpdateAnimation) -> Void))? @@ -864,7 +881,11 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { let normHeight: CGFloat if hasThumbnail { - normHeight = 64.0 + if arguments.isAttachedContentBlock { + normHeight = 58.0 + } else { + normHeight = 64.0 + } } else { normHeight = 44.0 } @@ -1707,7 +1728,11 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode { self.fetchingCompactTextNode.frame = CGRect(origin: self.descriptionNode.frame.origin, size: fetchingCompactSize) } - public static func asyncLayout(_ node: ChatMessageInteractiveFileNode?) -> (Arguments) -> (CGFloat, (CGSize) -> (CGFloat, (CGFloat) -> (CGSize, (Bool, ListViewItemUpdateAnimation, ListViewItemApply?) -> ChatMessageInteractiveFileNode))) { + public typealias Apply = (Bool, ListViewItemUpdateAnimation, ListViewItemApply?) -> ChatMessageInteractiveFileNode + public typealias FinalizeLayout = (CGFloat) -> (CGSize, Apply) + public typealias ContinueLayout = (CGSize) -> (CGFloat, FinalizeLayout) + public typealias AsyncLayout = (Arguments) -> (CGFloat, ContinueLayout) + public static func asyncLayout(_ node: ChatMessageInteractiveFileNode?) -> AsyncLayout { let currentAsyncLayout = node?.asyncLayout() return { arguments in diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageWebpageBubbleContentNode/Sources/ChatMessageWebpageBubbleContentNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageWebpageBubbleContentNode/Sources/ChatMessageWebpageBubbleContentNode.swift index 39d19f49d1..7ff5b33872 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageWebpageBubbleContentNode/Sources/ChatMessageWebpageBubbleContentNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageWebpageBubbleContentNode/Sources/ChatMessageWebpageBubbleContentNode.swift @@ -55,17 +55,28 @@ public final class ChatMessageWebpageBubbleContentNode: ChatMessageBubbleContent return } else { if content.embedUrl == nil && (content.title != nil || content.text != nil) { - var isConcealed = true - if item.message.text.contains(content.url) { - isConcealed = false - } - if let attribute = item.message.webpagePreviewAttribute { - if attribute.isSafe { - isConcealed = false + var shouldOpenUrl = true + if let file = content.file { + if !file.isVideo, !file.isVideoSticker, !file.isAnimated, !file.isAnimatedSticker, !file.isSticker, !file.isMusic { + shouldOpenUrl = false + } else if file.isMusic || file.isVoice { + shouldOpenUrl = false } } - item.controllerInteraction.openUrl(ChatControllerInteraction.OpenUrl(url: content.url, concealed: isConcealed, progress: strongSelf.contentNode.makeProgress())) - return + + if shouldOpenUrl { + var isConcealed = true + if item.message.text.contains(content.url) { + isConcealed = false + } + if let attribute = item.message.webpagePreviewAttribute { + if attribute.isSafe { + isConcealed = false + } + } + item.controllerInteraction.openUrl(ChatControllerInteraction.OpenUrl(url: content.url, concealed: isConcealed, progress: strongSelf.contentNode.makeProgress())) + return + } } } } diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionHide.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionHide.imageset/Contents.json new file mode 100644 index 0000000000..1caab208d5 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionHide.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "hidecaption_24.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionHide.imageset/hidecaption_24.pdf b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionHide.imageset/hidecaption_24.pdf new file mode 100644 index 0000000000..3d86f95ada --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionHide.imageset/hidecaption_24.pdf @@ -0,0 +1,177 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 3.334961 3.205170 cm +0.000000 0.000000 0.000000 scn +1.135289 17.265064 m +0.875590 17.524763 0.454536 17.524763 0.194837 17.265064 c +-0.064862 17.005365 -0.064862 16.584312 0.194837 16.324614 c +16.194838 0.324612 l +16.454536 0.064913 16.875591 0.064913 17.135290 0.324612 c +17.394989 0.584311 17.394989 1.005365 17.135290 1.265064 c +15.270563 3.129791 l +15.665111 3.129791 l +16.032377 3.129791 16.330109 3.427522 16.330109 3.794791 c +16.330109 4.162061 16.032377 4.459791 15.665111 4.459791 c +13.940563 4.459791 l +7.330003 11.070351 l +7.330003 12.694838 l +7.330004 12.718859 l +7.330019 12.978289 7.330032 13.211649 7.314171 13.405788 c +7.297186 13.613665 7.258753 13.834405 7.148529 14.050732 c +6.988900 14.364021 6.734188 14.618734 6.420897 14.778363 c +6.204570 14.888588 5.983830 14.927021 5.775954 14.944005 c +5.581833 14.959866 5.348500 14.959853 5.089100 14.959841 c +5.089095 14.959841 l +5.089057 14.959841 l +5.089017 14.959841 l +5.065003 14.959841 l +3.440514 14.959841 l +1.135289 17.265064 l +h +4.770516 13.629837 m +6.000003 12.400351 l +6.000003 12.694838 l +6.000003 12.985837 5.999486 13.164092 5.988588 13.297483 c +5.983510 13.359637 5.977127 13.397297 5.971728 13.420219 c +5.969160 13.431128 5.967000 13.437864 5.965689 13.441540 c +5.964900 13.443751 5.964303 13.445174 5.963926 13.446011 c +5.963701 13.446509 5.963554 13.446799 5.963490 13.446924 c +5.931373 13.509958 5.880125 13.561207 5.817090 13.593325 c +5.816755 13.593495 5.815236 13.594263 5.811705 13.595523 c +5.808031 13.596835 5.801293 13.598994 5.790386 13.601562 c +5.767462 13.606961 5.729803 13.613344 5.667649 13.618422 c +5.534258 13.629320 5.356003 13.629837 5.065003 13.629837 c +4.770516 13.629837 l +h +0.181478 14.050732 m +0.267737 14.220026 0.381761 14.372214 0.517790 14.501538 c +1.459741 13.559587 l +1.420951 13.529512 1.389032 13.491115 1.366516 13.446924 c +1.366346 13.446590 1.365578 13.445070 1.364318 13.441540 c +1.363006 13.437864 1.360847 13.431128 1.358278 13.420219 c +1.352880 13.397297 1.346497 13.359637 1.341419 13.297483 c +1.330521 13.164092 1.330003 12.985837 1.330003 12.694838 c +1.330003 9.894837 l +1.330003 9.603838 1.330521 9.425583 1.341419 9.292192 c +1.346497 9.230038 1.352880 9.192378 1.358278 9.169455 c +1.360847 9.158547 1.363006 9.151810 1.364318 9.148135 c +1.365578 9.144605 1.366346 9.143085 1.366516 9.142751 c +1.398634 9.079716 1.449882 9.028467 1.512917 8.996350 c +1.513251 8.996180 1.514771 8.995412 1.518302 8.994151 c +1.521976 8.992840 1.528713 8.990681 1.539621 8.988112 c +1.562544 8.982714 1.600204 8.976331 1.662358 8.971252 c +1.795749 8.960355 1.974004 8.959837 2.265003 8.959837 c +5.065003 8.959837 l +5.356003 8.959837 5.534258 8.960355 5.667649 8.971252 c +5.729803 8.976331 5.767462 8.982714 5.790386 8.988112 c +5.801293 8.990681 5.808031 8.992840 5.811705 8.994151 c +5.815236 8.995412 5.816755 8.996180 5.817090 8.996350 c +5.861280 9.018866 5.899678 9.050784 5.929753 9.089574 c +6.871704 8.147623 l +6.742380 8.011595 6.590191 7.897571 6.420897 7.811312 c +6.204570 7.701087 5.983830 7.662654 5.775953 7.645670 c +5.581820 7.629809 5.348469 7.629822 5.089050 7.629836 c +5.089025 7.629836 l +5.065003 7.629837 l +2.265003 7.629837 l +2.240981 7.629836 l +2.240957 7.629836 l +1.981538 7.629822 1.748187 7.629809 1.554053 7.645670 c +1.346177 7.662654 1.125436 7.701087 0.909109 7.811312 c +0.595819 7.970941 0.341107 8.225653 0.181478 8.538943 c +0.071253 8.755270 0.032820 8.976010 0.015836 9.183887 c +-0.000024 9.378011 -0.000013 9.611347 0.000001 9.870750 c +0.000001 9.870787 l +0.000001 9.870823 l +0.000001 9.894837 l +0.000001 12.694838 l +0.000001 12.718851 l +0.000001 12.718889 l +0.000001 12.718924 l +-0.000013 12.978327 -0.000024 13.211664 0.015836 13.405788 c +0.032820 13.613665 0.071253 13.834405 0.181478 14.050732 c +h +1.665110 4.459791 m +10.559536 4.459791 l +11.889536 3.129791 l +1.665110 3.129791 l +1.297841 3.129791 1.000110 3.427522 1.000110 3.794791 c +1.000110 4.162061 1.297841 4.459791 1.665110 4.459791 c +h +10.665111 14.459792 m +10.297841 14.459792 10.000111 14.162062 10.000111 13.794792 c +10.000111 13.427523 10.297841 13.129791 10.665111 13.129791 c +15.665111 13.129791 l +16.032377 13.129791 16.330109 13.427523 16.330109 13.794792 c +16.330109 14.162062 16.032377 14.459792 15.665111 14.459792 c +10.665111 14.459792 l +h +12.665111 9.459791 m +12.297841 9.459791 12.000111 9.162061 12.000111 8.794791 c +12.000111 8.427522 12.297841 8.129791 12.665111 8.129791 c +15.665111 8.129791 l +16.032377 8.129791 16.330109 8.427522 16.330109 8.794791 c +16.330109 9.162061 16.032377 9.459791 15.665111 9.459791 c +12.665111 9.459791 l +h +f* +n +Q + +endstream +endobj + +3 0 obj + 4618 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000004708 00000 n +0000004731 00000 n +0000004904 00000 n +0000004978 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +5037 +%%EOF \ No newline at end of file diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionShow.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionShow.imageset/Contents.json new file mode 100644 index 0000000000..8b6179bcaf --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionShow.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "showcaption_24.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionShow.imageset/showcaption_24.pdf b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionShow.imageset/showcaption_24.pdf new file mode 100644 index 0000000000..174e22bccd --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/CaptionShow.imageset/showcaption_24.pdf @@ -0,0 +1,169 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 3.334961 6.334900 cm +0.000000 0.000000 0.000000 scn +2.265003 11.830077 m +2.240989 11.830077 l +2.240949 11.830077 l +1.981532 11.830091 1.748184 11.830104 1.554052 11.814242 c +1.346176 11.797258 1.125435 11.758825 0.909108 11.648602 c +0.595819 11.488972 0.341106 11.234260 0.181477 10.920970 c +0.071253 10.704642 0.032820 10.483902 0.015835 10.276026 c +-0.000026 10.081894 -0.000013 9.848544 0.000001 9.589127 c +0.000001 9.589089 l +0.000001 9.565076 l +0.000001 6.765075 l +0.000001 6.741061 l +0.000001 6.741024 l +-0.000013 6.481606 -0.000026 6.248257 0.015835 6.054125 c +0.032820 5.846249 0.071253 5.625508 0.181477 5.409181 c +0.341106 5.095891 0.595819 4.841178 0.909108 4.681550 c +1.125435 4.571325 1.346176 4.532892 1.554052 4.515908 c +1.748192 4.500046 1.981551 4.500060 2.240980 4.500074 c +2.265002 4.500075 l +5.065003 4.500075 l +5.089025 4.500074 l +5.348454 4.500060 5.581814 4.500046 5.775953 4.515908 c +5.983829 4.532892 6.204570 4.571325 6.420897 4.681550 c +6.734187 4.841178 6.988900 5.095891 7.148529 5.409181 c +7.258753 5.625508 7.297186 5.846249 7.314170 6.054125 c +7.330032 6.248264 7.330019 6.481624 7.330004 6.741053 c +7.330003 6.765075 l +7.330003 9.565075 l +7.330004 9.589098 l +7.330019 9.848527 7.330032 10.081886 7.314170 10.276026 c +7.297186 10.483902 7.258753 10.704642 7.148529 10.920970 c +6.988900 11.234260 6.734187 11.488972 6.420897 11.648602 c +6.204570 11.758825 5.983829 11.797258 5.775953 11.814242 c +5.581822 11.830104 5.348474 11.830091 5.089057 11.830077 c +5.089017 11.830077 l +5.065003 11.830077 l +2.265003 11.830077 l +h +1.512916 10.463563 m +1.513250 10.463733 1.514770 10.464500 1.518301 10.465761 c +1.521975 10.467072 1.528712 10.469232 1.539620 10.471801 c +1.562544 10.477199 1.600203 10.483582 1.662357 10.488660 c +1.795748 10.499558 1.974003 10.500075 2.265003 10.500075 c +5.065003 10.500075 l +5.356002 10.500075 5.534257 10.499558 5.667649 10.488660 c +5.729803 10.483582 5.767462 10.477199 5.790385 10.471801 c +5.801293 10.469232 5.808030 10.467072 5.811704 10.465761 c +5.815235 10.464500 5.816755 10.463733 5.817090 10.463563 c +5.880124 10.431445 5.931373 10.380197 5.963490 10.317163 c +5.963660 10.316828 5.964428 10.315308 5.965689 10.311777 c +5.967000 10.308103 5.969159 10.301366 5.971728 10.290458 c +5.977127 10.267534 5.983509 10.229876 5.988587 10.167721 c +5.999485 10.034330 6.000003 9.856074 6.000003 9.565075 c +6.000003 6.765075 l +6.000003 6.474076 5.999485 6.295821 5.988587 6.162429 c +5.983509 6.100276 5.977127 6.062616 5.971728 6.039693 c +5.969159 6.028785 5.967000 6.022048 5.965689 6.018374 c +5.964428 6.014843 5.963660 6.013323 5.963490 6.012989 c +5.931373 5.949954 5.880124 5.898705 5.817090 5.866588 c +5.816755 5.866418 5.815235 5.865650 5.811705 5.864389 c +5.808030 5.863078 5.801293 5.860919 5.790385 5.858350 c +5.767462 5.852952 5.729803 5.846569 5.667649 5.841491 c +5.534257 5.830593 5.356002 5.830075 5.065003 5.830075 c +2.265002 5.830075 l +1.974003 5.830075 1.795748 5.830593 1.662357 5.841491 c +1.600203 5.846569 1.562544 5.852952 1.539620 5.858350 c +1.528712 5.860919 1.521975 5.863078 1.518301 5.864389 c +1.514770 5.865650 1.513250 5.866418 1.512916 5.866588 c +1.449882 5.898705 1.398633 5.949954 1.366516 6.012989 c +1.366345 6.013323 1.365577 6.014843 1.364317 6.018373 c +1.363005 6.022048 1.360846 6.028785 1.358277 6.039693 c +1.352879 6.062616 1.346496 6.100276 1.341418 6.162429 c +1.330520 6.295821 1.330003 6.474076 1.330003 6.765075 c +1.330003 9.565076 l +1.330003 9.856075 1.330520 10.034330 1.341418 10.167721 c +1.346496 10.229876 1.352879 10.267534 1.358277 10.290458 c +1.360846 10.301366 1.363005 10.308103 1.364317 10.311777 c +1.365577 10.315308 1.366345 10.316828 1.366516 10.317163 c +1.398633 10.380197 1.449882 10.431445 1.512916 10.463563 c +h +10.665110 11.330029 m +10.297840 11.330029 10.000110 11.032299 10.000110 10.665030 c +10.000110 10.297760 10.297840 10.000030 10.665110 10.000030 c +15.665110 10.000030 l +16.032377 10.000030 16.330109 10.297760 16.330109 10.665030 c +16.330109 11.032299 16.032377 11.330029 15.665110 11.330029 c +10.665110 11.330029 l +h +10.665110 6.330029 m +10.297840 6.330029 10.000110 6.032299 10.000110 5.665030 c +10.000110 5.297760 10.297840 5.000030 10.665110 5.000030 c +15.665110 5.000030 l +16.032377 5.000030 16.330109 5.297760 16.330109 5.665030 c +16.330109 6.032299 16.032377 6.330029 15.665110 6.330029 c +10.665110 6.330029 l +h +1.000109 0.665030 m +1.000109 1.032299 1.297840 1.330029 1.665109 1.330029 c +15.665110 1.330029 l +16.032377 1.330029 16.330109 1.032299 16.330109 0.665030 c +16.330109 0.297760 16.032377 0.000030 15.665110 0.000030 c +1.665109 0.000030 l +1.297840 0.000030 1.000109 0.297760 1.000109 0.665030 c +h +f* +n +Q + +endstream +endobj + +3 0 obj + 4706 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000004796 00000 n +0000004819 00000 n +0000004992 00000 n +0000005066 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +5125 +%%EOF \ No newline at end of file diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageEnlarge.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageEnlarge.imageset/Contents.json new file mode 100644 index 0000000000..2e3791ba27 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageEnlarge.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "enlarge_24.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageEnlarge.imageset/enlarge_24.pdf b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageEnlarge.imageset/enlarge_24.pdf new file mode 100644 index 0000000000..b7ea8886d7 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageEnlarge.imageset/enlarge_24.pdf @@ -0,0 +1,169 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 3.835083 3.834961 cm +0.000000 0.000000 0.000000 scn +5.436178 16.330017 m +5.465000 16.330017 l +10.865000 16.330017 l +10.893822 16.330017 l +11.709461 16.330023 12.362126 16.330027 12.889546 16.286936 c +13.430926 16.242702 13.898637 16.149773 14.328876 15.930555 c +15.018489 15.579180 15.579163 15.018506 15.930539 14.328892 c +16.149757 13.898653 16.242687 13.430943 16.286919 12.889563 c +16.330009 12.362154 16.330006 11.709505 16.330000 10.893888 c +16.330000 10.893824 l +16.330000 10.865017 l +16.330000 5.465017 l +16.330000 5.436212 l +16.330000 5.436146 l +16.330006 4.620529 16.330009 3.967880 16.286919 3.440471 c +16.242687 2.899091 16.149757 2.431380 15.930539 2.001142 c +15.579163 1.311528 15.018489 0.750854 14.328876 0.399478 c +13.898637 0.180260 13.430927 0.087330 12.889546 0.043098 c +12.362138 0.000008 11.709489 0.000011 10.893871 0.000017 c +10.893806 0.000017 l +10.865000 0.000017 l +5.465000 0.000017 l +5.436194 0.000017 l +5.436130 0.000017 l +4.620512 0.000011 3.967863 0.000008 3.440454 0.043098 c +2.899074 0.087330 2.431364 0.180260 2.001125 0.399478 c +1.311511 0.750854 0.750837 1.311528 0.399461 2.001142 c +0.180244 2.431380 0.087314 2.899090 0.043081 3.440471 c +-0.000010 3.967890 -0.000006 4.620555 0.000000 5.436195 c +0.000000 5.465017 l +0.000000 10.865017 l +0.000000 10.893839 l +-0.000006 11.709478 -0.000010 12.362144 0.043081 12.889563 c +0.087314 13.430943 0.180244 13.898653 0.399461 14.328892 c +0.750837 15.018506 1.311511 15.579180 2.001125 15.930555 c +2.431364 16.149773 2.899074 16.242702 3.440454 16.286936 c +3.967873 16.330027 4.620538 16.330023 5.436178 16.330017 c +h +3.548759 14.961352 m +3.089627 14.923841 2.816429 14.853280 2.604933 14.745517 c +2.165574 14.521652 1.808364 14.164443 1.584500 13.725084 c +1.476737 13.513588 1.406177 13.240391 1.368664 12.781259 c +1.330518 12.314363 1.330000 11.716068 1.330000 10.865017 c +1.330000 5.465017 l +1.330000 4.613965 1.330518 4.015671 1.368664 3.548775 c +1.406177 3.089643 1.476737 2.816445 1.584500 2.604949 c +1.808364 2.165591 2.165574 1.808381 2.604933 1.584517 c +2.816429 1.476754 3.089627 1.406194 3.548759 1.368681 c +4.015654 1.330534 4.613948 1.330017 5.465000 1.330017 c +10.865000 1.330017 l +11.716052 1.330017 12.314346 1.330534 12.781242 1.368681 c +13.240374 1.406194 13.513572 1.476754 13.725068 1.584517 c +14.164426 1.808381 14.521636 2.165591 14.745501 2.604949 c +14.853263 2.816445 14.923823 3.089643 14.961336 3.548776 c +14.999483 4.015671 15.000000 4.613965 15.000000 5.465017 c +15.000000 10.865017 l +15.000000 11.716068 14.999483 12.314363 14.961336 12.781259 c +14.923823 13.240391 14.853263 13.513588 14.745501 13.725084 c +14.521636 14.164443 14.164426 14.521652 13.725068 14.745517 c +13.513572 14.853280 13.240374 14.923841 12.781241 14.961352 c +12.314346 14.999499 11.716052 15.000017 10.865000 15.000017 c +5.465000 15.000017 l +4.613948 15.000017 4.015654 14.999499 3.548759 14.961352 c +h +12.164879 7.829895 m +11.797609 7.829895 11.499878 7.532164 11.499878 7.164894 c +11.499878 5.770347 l +9.635104 7.635120 l +9.375405 7.894819 8.954351 7.894819 8.694653 7.635120 c +8.434954 7.375422 8.434954 6.954368 8.694653 6.694669 c +10.559426 4.829895 l +9.164879 4.829895 l +8.797609 4.829895 8.499878 4.532164 8.499878 4.164894 c +8.499878 3.797626 8.797609 3.499895 9.164879 3.499895 c +12.148878 3.499895 l +12.153147 3.499901 l +12.157188 3.499939 l +12.329931 3.497953 12.503300 3.562863 12.635104 3.694669 c +12.766910 3.826473 12.831820 3.999842 12.829834 4.172585 c +12.829872 4.176626 l +12.829878 4.180895 l +12.829878 7.164894 l +12.829878 7.532164 12.532147 7.829895 12.164879 7.829895 c +h +4.164834 8.499878 m +3.797565 8.499878 3.499834 8.797609 3.499834 9.164879 c +3.499834 12.148878 l +3.499840 12.153147 l +3.499878 12.157188 l +3.497893 12.329931 3.562803 12.503299 3.694608 12.635104 c +3.826413 12.766910 3.999781 12.831820 4.172523 12.829834 c +4.176565 12.829872 l +4.180834 12.829878 l +7.164834 12.829878 l +7.532103 12.829878 7.829834 12.532147 7.829834 12.164879 c +7.829834 11.797609 7.532103 11.499878 7.164834 11.499878 c +5.770286 11.499878 l +7.635059 9.635104 l +7.894758 9.375406 7.894758 8.954351 7.635059 8.694653 c +7.375361 8.434954 6.954306 8.434954 6.694608 8.694653 c +4.829834 10.559426 l +4.829834 9.164879 l +4.829834 8.797609 4.532103 8.499878 4.164834 8.499878 c +h +f* +n +Q + +endstream +endobj + +3 0 obj + 4337 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000004427 00000 n +0000004450 00000 n +0000004623 00000 n +0000004697 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +4756 +%%EOF \ No newline at end of file diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageShrink.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageShrink.imageset/Contents.json new file mode 100644 index 0000000000..fb10bc0705 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageShrink.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "shrink_24.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageShrink.imageset/shrink_24.pdf b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageShrink.imageset/shrink_24.pdf new file mode 100644 index 0000000000..0b4710ee5d --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/ImageShrink.imageset/shrink_24.pdf @@ -0,0 +1,169 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 3.835083 3.834961 cm +0.000000 0.000000 0.000000 scn +5.436178 16.330017 m +5.465000 16.330017 l +10.865000 16.330017 l +10.893822 16.330017 l +11.709461 16.330023 12.362126 16.330027 12.889546 16.286936 c +13.430926 16.242702 13.898637 16.149773 14.328876 15.930555 c +15.018489 15.579180 15.579163 15.018506 15.930539 14.328892 c +16.149757 13.898653 16.242687 13.430943 16.286919 12.889563 c +16.330009 12.362154 16.330006 11.709505 16.330000 10.893888 c +16.330000 10.893824 l +16.330000 10.865017 l +16.330000 5.465017 l +16.330000 5.436212 l +16.330000 5.436146 l +16.330006 4.620529 16.330009 3.967880 16.286919 3.440471 c +16.242687 2.899091 16.149757 2.431380 15.930539 2.001142 c +15.579163 1.311528 15.018489 0.750854 14.328876 0.399478 c +13.898637 0.180260 13.430927 0.087330 12.889546 0.043098 c +12.362138 0.000008 11.709489 0.000011 10.893871 0.000017 c +10.893806 0.000017 l +10.865000 0.000017 l +5.465000 0.000017 l +5.436194 0.000017 l +5.436130 0.000017 l +4.620512 0.000011 3.967863 0.000008 3.440454 0.043098 c +2.899074 0.087330 2.431364 0.180260 2.001125 0.399478 c +1.311511 0.750854 0.750837 1.311528 0.399461 2.001142 c +0.180244 2.431380 0.087314 2.899090 0.043081 3.440471 c +-0.000010 3.967890 -0.000006 4.620555 0.000000 5.436195 c +0.000000 5.465017 l +0.000000 10.865017 l +0.000000 10.893839 l +-0.000006 11.709478 -0.000010 12.362144 0.043081 12.889563 c +0.087314 13.430943 0.180244 13.898653 0.399461 14.328892 c +0.750837 15.018506 1.311511 15.579180 2.001125 15.930555 c +2.431364 16.149773 2.899074 16.242702 3.440454 16.286936 c +3.967873 16.330027 4.620538 16.330023 5.436178 16.330017 c +h +3.548759 14.961352 m +3.089627 14.923841 2.816429 14.853280 2.604933 14.745517 c +2.165574 14.521652 1.808364 14.164443 1.584500 13.725084 c +1.476737 13.513588 1.406177 13.240391 1.368664 12.781259 c +1.330518 12.314363 1.330000 11.716068 1.330000 10.865017 c +1.330000 5.465017 l +1.330000 4.613965 1.330518 4.015671 1.368664 3.548775 c +1.406177 3.089643 1.476737 2.816445 1.584500 2.604949 c +1.808364 2.165591 2.165574 1.808381 2.604933 1.584517 c +2.816429 1.476754 3.089627 1.406194 3.548759 1.368681 c +4.015654 1.330534 4.613948 1.330017 5.465000 1.330017 c +10.865000 1.330017 l +11.716052 1.330017 12.314346 1.330534 12.781242 1.368681 c +13.240374 1.406194 13.513572 1.476754 13.725068 1.584517 c +14.164426 1.808381 14.521636 2.165591 14.745501 2.604949 c +14.853263 2.816445 14.923823 3.089643 14.961336 3.548776 c +14.999483 4.015671 15.000000 4.613965 15.000000 5.465017 c +15.000000 10.865017 l +15.000000 11.716068 14.999483 12.314363 14.961336 12.781259 c +14.923823 13.240391 14.853263 13.513588 14.745501 13.725084 c +14.521636 14.164443 14.164426 14.521652 13.725068 14.745517 c +13.513572 14.853280 13.240374 14.923841 12.781241 14.961352 c +12.314346 14.999499 11.716052 15.000017 10.865000 15.000017 c +5.465000 15.000017 l +4.613948 15.000017 4.015654 14.999499 3.548759 14.961352 c +h +7.829878 12.164894 m +7.829878 12.532164 7.532147 12.829895 7.164878 12.829895 c +6.797609 12.829895 6.499878 12.532164 6.499878 12.164894 c +6.499878 10.770347 l +4.635104 12.635120 l +4.375406 12.894819 3.954351 12.894819 3.694653 12.635120 c +3.434954 12.375422 3.434954 11.954367 3.694653 11.694669 c +5.559426 9.829895 l +4.164878 9.829895 l +3.797609 9.829895 3.499878 9.532164 3.499878 9.164894 c +3.499878 8.797626 3.797609 8.499895 4.164878 8.499895 c +7.148878 8.499895 l +7.153147 8.499901 l +7.157188 8.499939 l +7.329931 8.497953 7.503299 8.562863 7.635104 8.694669 c +7.766910 8.826473 7.831820 8.999842 7.829834 9.172585 c +7.829872 9.176626 l +7.829878 9.180895 l +7.829878 12.164894 l +h +9.164833 3.499878 m +8.797565 3.499878 8.499834 3.797609 8.499834 4.164879 c +8.499834 7.148878 l +8.499840 7.153147 l +8.499878 7.157188 l +8.497892 7.329931 8.562802 7.503300 8.694608 7.635104 c +8.826412 7.766910 8.999781 7.831820 9.172523 7.829834 c +9.176565 7.829872 l +9.180834 7.829878 l +12.164833 7.829878 l +12.532103 7.829878 12.829834 7.532147 12.829834 7.164879 c +12.829834 6.797609 12.532103 6.499878 12.164833 6.499878 c +10.770286 6.499878 l +12.635059 4.635104 l +12.894758 4.375405 12.894758 3.954351 12.635059 3.694653 c +12.375360 3.434954 11.954307 3.434954 11.694608 3.694653 c +9.829834 5.559426 l +9.829834 4.164879 l +9.829834 3.797609 9.532103 3.499878 9.164833 3.499878 c +h +f* +n +Q + +endstream +endobj + +3 0 obj + 4327 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000004417 00000 n +0000004440 00000 n +0000004613 00000 n +0000004687 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +4746 +%%EOF \ No newline at end of file diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveDown.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveDown.imageset/Contents.json new file mode 100644 index 0000000000..f03ff11a99 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveDown.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "movedown_24.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveDown.imageset/movedown_24.pdf b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveDown.imageset/movedown_24.pdf new file mode 100644 index 0000000000..40b469adce --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveDown.imageset/movedown_24.pdf @@ -0,0 +1,104 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 3.334961 3.270081 cm +0.000000 0.000000 0.000000 scn +0.665000 14.394897 m +0.297731 14.394897 0.000000 14.097167 0.000000 13.729897 c +0.000000 13.362628 0.297731 13.064898 0.665000 13.064898 c +14.665000 13.064898 l +15.032269 13.064898 15.330000 13.362628 15.330000 13.729897 c +15.330000 14.097167 15.032269 14.394897 14.665000 14.394897 c +0.665000 14.394897 l +h +0.665000 9.394897 m +0.297731 9.394897 0.000000 9.097167 0.000000 8.729897 c +0.000000 8.362628 0.297731 8.064898 0.665000 8.064898 c +10.665000 8.064898 l +11.032269 8.064898 11.330000 8.362628 11.330000 8.729897 c +11.330000 9.097167 11.032269 9.394897 10.665000 9.394897 c +0.665000 9.394897 l +h +0.000000 3.729897 m +0.000000 4.097167 0.297731 4.394897 0.665000 4.394897 c +7.665000 4.394897 l +8.032269 4.394897 8.330000 4.097167 8.330000 3.729897 c +8.330000 3.362628 8.032269 3.064898 7.665000 3.064898 c +0.665000 3.064898 l +0.297731 3.064898 0.000000 3.362628 0.000000 3.729897 c +h +18.135204 3.259693 m +15.135205 0.259693 l +14.875506 -0.000005 14.454452 -0.000005 14.194753 0.259693 c +11.194754 3.259693 l +10.935055 3.519392 10.935055 3.940447 11.194754 4.200146 c +11.454452 4.459844 11.875506 4.459844 12.135205 4.200146 c +13.999979 2.335371 l +13.999979 8.729919 l +13.999979 9.097189 14.297709 9.394919 14.664979 9.394919 c +15.032248 9.394919 15.329979 9.097189 15.329979 8.729919 c +15.329979 2.335371 l +17.194754 4.200146 l +17.454453 4.459844 17.875505 4.459844 18.135204 4.200146 c +18.394903 3.940447 18.394903 3.519392 18.135204 3.259693 c +h +f* +n +Q + +endstream +endobj + +3 0 obj + 1577 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000001667 00000 n +0000001690 00000 n +0000001863 00000 n +0000001937 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +1996 +%%EOF \ No newline at end of file diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveUp.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveUp.imageset/Contents.json new file mode 100644 index 0000000000..e7e9c9dcf9 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveUp.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "moveup_24.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveUp.imageset/moveup_24.pdf b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveUp.imageset/moveup_24.pdf new file mode 100644 index 0000000000..2f2a35bea0 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/MoveUp.imageset/moveup_24.pdf @@ -0,0 +1,104 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 3.334961 6.270081 cm +0.000000 0.000000 0.000000 scn +14.194735 14.200185 m +14.454433 14.459883 14.875488 14.459883 15.135187 14.200185 c +18.135187 11.200185 l +18.394886 10.940486 18.394886 10.519431 18.135187 10.259732 c +17.875488 10.000034 17.454433 10.000034 17.194736 10.259732 c +15.329961 12.124506 l +15.329961 5.729959 l +15.329961 5.362689 15.032230 5.064959 14.664961 5.064959 c +14.297691 5.064959 13.999961 5.362689 13.999961 5.729959 c +13.999961 12.124506 l +12.135187 10.259732 l +11.875488 10.000034 11.454433 10.000034 11.194735 10.259732 c +10.935037 10.519431 10.935037 10.940486 11.194735 11.200185 c +14.194735 14.200185 l +h +0.000000 10.729919 m +0.000000 11.097189 0.297731 11.394919 0.665000 11.394919 c +7.665000 11.394919 l +8.032269 11.394919 8.330000 11.097189 8.330000 10.729919 c +8.330000 10.362650 8.032269 10.064919 7.665000 10.064919 c +0.665000 10.064919 l +0.297731 10.064919 0.000000 10.362650 0.000000 10.729919 c +h +0.665022 6.394897 m +0.297753 6.394897 0.000022 6.097167 0.000022 5.729897 c +0.000022 5.362628 0.297753 5.064898 0.665022 5.064898 c +10.665022 5.064898 l +11.032291 5.064898 11.330022 5.362628 11.330022 5.729897 c +11.330022 6.097167 11.032291 6.394897 10.665022 6.394897 c +0.665022 6.394897 l +h +0.665000 1.394919 m +0.297731 1.394919 0.000000 1.097189 0.000000 0.729919 c +0.000000 0.362650 0.297731 0.064919 0.665000 0.064919 c +14.665000 0.064919 l +15.032269 0.064919 15.330000 0.362650 15.330000 0.729919 c +15.330000 1.097189 15.032269 1.394919 14.665000 1.394919 c +0.665000 1.394919 l +h +f* +n +Q + +endstream +endobj + +3 0 obj + 1596 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000001686 00000 n +0000001709 00000 n +0000001882 00000 n +0000001956 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +2015 +%%EOF \ No newline at end of file diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/UserCrossed.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/UserCrossed.imageset/Contents.json new file mode 100644 index 0000000000..ab416f72c8 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/UserCrossed.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "hideforward_24.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/UserCrossed.imageset/hideforward_24.pdf b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/UserCrossed.imageset/hideforward_24.pdf new file mode 100644 index 0000000000..b05af4f661 --- /dev/null +++ b/submodules/TelegramUI/Images.xcassets/Chat/Context Menu/UserCrossed.imageset/hideforward_24.pdf @@ -0,0 +1,112 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 3.334961 1.270081 cm +0.000000 0.000000 0.000000 scn +6.330028 15.229959 m +6.330028 16.519543 7.375443 17.564959 8.665028 17.564959 c +9.954613 17.564959 11.000028 16.519543 11.000028 15.229959 c +11.000028 13.940373 9.954613 12.894958 8.665028 12.894958 c +7.375443 12.894958 6.330028 13.940373 6.330028 15.229959 c +h +8.665028 18.894958 m +6.640904 18.894958 5.000028 17.254082 5.000028 15.229959 c +5.000028 13.205835 6.640904 11.564959 8.665028 11.564959 c +10.689151 11.564959 12.330028 13.205835 12.330028 15.229959 c +12.330028 17.254082 10.689151 18.894958 8.665028 18.894958 c +h +2.847365 5.874736 m +3.182212 6.620716 3.727596 7.408447 4.622032 8.012360 c +5.052609 8.303081 5.574740 8.558434 6.209703 8.744807 c +5.164166 9.790345 l +4.686711 9.600591 4.259488 9.372349 3.877790 9.114632 c +2.736064 8.343752 2.047248 7.340033 1.633996 6.419378 c +1.238339 5.537922 1.434021 4.662781 1.966020 4.035870 c +2.481754 3.428125 3.295742 3.064959 4.165028 3.064959 c +11.889552 3.064959 l +10.559552 4.394958 l +4.165028 4.394958 l +3.653601 4.394958 3.222711 4.610523 2.980097 4.896420 c +2.753749 5.163151 2.677613 5.496559 2.847365 5.874736 c +h +14.796587 3.538785 m +17.135227 1.200146 l +17.394926 0.940447 17.394926 0.519392 17.135227 0.259693 c +16.875528 -0.000006 16.454473 -0.000006 16.194775 0.259693 c +0.194774 16.259693 l +-0.064925 16.519392 -0.064925 16.940447 0.194774 17.200146 c +0.454473 17.459845 0.875527 17.459845 1.135226 17.200146 c +7.960464 10.374907 l +8.188262 10.388149 8.423051 10.394958 8.665028 10.394958 c +10.754458 10.394958 12.307954 9.887258 13.452266 9.114632 c +14.593992 8.343751 15.282808 7.340032 15.696060 6.419377 c +16.091717 5.537921 15.896035 4.662780 15.364036 4.035870 c +15.201860 3.844761 15.010192 3.677837 14.796587 3.538785 c +h +13.815245 4.520127 m +14.036389 4.610582 14.220131 4.743431 14.349958 4.896420 c +14.576306 5.163150 14.652442 5.496557 14.482691 5.874735 c +14.147844 6.620715 13.602460 7.408447 12.708024 8.012359 c +11.919037 8.545074 10.822649 8.959038 9.287930 9.047441 c +13.815245 4.520127 l +h +f* +n +Q + +endstream +endobj + +3 0 obj + 2105 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000002195 00000 n +0000002218 00000 n +0000002391 00000 n +0000002465 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +2524 +%%EOF \ No newline at end of file diff --git a/submodules/TelegramUI/Sources/Chat/ChatMessageActionOptions.swift b/submodules/TelegramUI/Sources/Chat/ChatMessageActionOptions.swift index a91fa11935..f093d8c65b 100644 --- a/submodules/TelegramUI/Sources/Chat/ChatMessageActionOptions.swift +++ b/submodules/TelegramUI/Sources/Chat/ChatMessageActionOptions.swift @@ -169,7 +169,7 @@ private func chatForwardOptions(selfController: ChatControllerImpl, sourceNode: if canHideNames { items.append(.action(ContextMenuActionItem(text: hideNames ? (uniquePeerIds.count == 1 ? presentationData.strings.Conversation_ForwardOptions_ShowSendersName : presentationData.strings.Conversation_ForwardOptions_ShowSendersNames) : (uniquePeerIds.count == 1 ? presentationData.strings.Conversation_ForwardOptions_HideSendersName : presentationData.strings.Conversation_ForwardOptions_HideSendersNames), icon: { theme in - return nil//generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: theme.contextMenu.primaryColor) + return generateTintedImage(image: UIImage(bundleImageName: !hideNames ? "Chat/Context Menu/UserCrossed" : "Chat/Context Menu/User"), color: theme.contextMenu.primaryColor) }, action: { [weak selfController] _, f in selfController?.interfaceInteraction?.updateForwardOptionsState({ current in var updated = current @@ -188,7 +188,7 @@ private func chatForwardOptions(selfController: ChatControllerImpl, sourceNode: if hasCaptions { items.append(.action(ContextMenuActionItem(text: hideCaptions ? presentationData.strings.Conversation_ForwardOptions_ShowCaption : presentationData.strings.Conversation_ForwardOptions_HideCaption, icon: { theme in - return nil//generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: theme.contextMenu.primaryColor) + return generateTintedImage(image: UIImage(bundleImageName: !hideCaptions ? "Chat/Context Menu/CaptionHide" : "Chat/Context Menu/CaptionShow"), color: theme.contextMenu.primaryColor) }, action: { [weak selfController] _, f in selfController?.interfaceInteraction?.updateForwardOptionsState({ current in var updated = current @@ -710,10 +710,10 @@ private func chatLinkOptions(selfController: ChatControllerImpl, sourceNode: ASD } var items: [ContextMenuItem] = [] - if "".isEmpty { + do { //TODO:localize items.append(.action(ContextMenuActionItem(text: linkOptions.linkBelowText ? "Move Up" : "Move Down", icon: { theme in - return nil//generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: theme.contextMenu.primaryColor) + return generateTintedImage(image: UIImage(bundleImageName: linkOptions.linkBelowText ? "Chat/Context Menu/MoveUp" : "Chat/Context Menu/MoveDown"), color: theme.contextMenu.primaryColor) }, action: { [weak selfController] _, f in selfController?.updateChatPresentationInterfaceState(animated: true, interactive: true, { state in if state.interfaceState.editMessage != nil { @@ -736,7 +736,7 @@ private func chatLinkOptions(selfController: ChatControllerImpl, sourceNode: ASD if case let .Loaded(content) = linkOptions.webpage.content, let isMediaLargeByDefault = content.isMediaLargeByDefault, isMediaLargeByDefault { //TODO:localize items.append(.action(ContextMenuActionItem(text: linkOptions.largeMedia ? "Shrink Photo" : "Enlarge Photo", icon: { theme in - return nil//generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Check"), color: theme.contextMenu.primaryColor) + return generateTintedImage(image: UIImage(bundleImageName: !linkOptions.largeMedia ? "Chat/Context Menu/ImageEnlarge" : "Chat/Context Menu/ImageShrink"), color: theme.contextMenu.primaryColor) }, action: { [weak selfController] _, f in selfController?.updateChatPresentationInterfaceState(animated: true, interactive: true, { state in if state.interfaceState.editMessage != nil {