mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Merge commit '61b298b9e2cc4c5bff12713e21561e1be5582152'
# Conflicts: # Telegram/Telegram-iOS/en.lproj/Localizable.strings
This commit is contained in:
commit
cecda9aeaa
@ -8403,3 +8403,5 @@ Sorry for the inconvenience.";
|
|||||||
"GlobalAutodeleteSettings.AttemptDisabledGroupSelection" = "You need admin rights in this group to enable auto-delete.";
|
"GlobalAutodeleteSettings.AttemptDisabledGroupSelection" = "You need admin rights in this group to enable auto-delete.";
|
||||||
"GlobalAutodeleteSettings.AttemptDisabledChannelSelection" = "You need admin rights in this channel to enable auto-delete.";
|
"GlobalAutodeleteSettings.AttemptDisabledChannelSelection" = "You need admin rights in this channel to enable auto-delete.";
|
||||||
"GlobalAutodeleteSettings.AttemptDisabledGenericSelection" = "You can't enable auto-delete in this chat.";
|
"GlobalAutodeleteSettings.AttemptDisabledGenericSelection" = "You can't enable auto-delete in this chat.";
|
||||||
|
|
||||||
|
"EmojiSearch.SearchEmojiPlaceholder" = "Search Emoji";
|
||||||
|
@ -533,7 +533,7 @@ final class AuthorizationSequencePhoneEntryControllerNode: ASDisplayNode {
|
|||||||
let titleInset: CGFloat = layout.size.width > 320.0 ? 18.0 : 0.0
|
let titleInset: CGFloat = layout.size.width > 320.0 ? 18.0 : 0.0
|
||||||
let additionalBottomInset: CGFloat = layout.size.width > 320.0 ? 80.0 : 10.0
|
let additionalBottomInset: CGFloat = layout.size.width > 320.0 ? 80.0 : 10.0
|
||||||
|
|
||||||
self.titleNode.attributedText = NSAttributedString(string: strings.Login_PhoneTitle, font: Font.bold(28.0), textColor: self.theme.list.itemPrimaryTextColor)
|
self.titleNode.attributedText = NSAttributedString(string: self.account == nil ? strings.Login_NewNumber : strings.Login_PhoneTitle, font: Font.bold(28.0), textColor: self.theme.list.itemPrimaryTextColor)
|
||||||
|
|
||||||
let inset: CGFloat = 24.0
|
let inset: CGFloat = 24.0
|
||||||
let maximumWidth: CGFloat = min(430.0, layout.size.width)
|
let maximumWidth: CGFloat = min(430.0, layout.size.width)
|
||||||
|
@ -792,6 +792,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
|||||||
isStandalone: false,
|
isStandalone: false,
|
||||||
isStatusSelection: true,
|
isStatusSelection: true,
|
||||||
isReactionSelection: false,
|
isReactionSelection: false,
|
||||||
|
isEmojiSelection: false,
|
||||||
topReactionItems: [],
|
topReactionItems: [],
|
||||||
areUnicodeEmojiEnabled: false,
|
areUnicodeEmojiEnabled: false,
|
||||||
areCustomEmojiEnabled: true,
|
areCustomEmojiEnabled: true,
|
||||||
|
@ -347,6 +347,7 @@ public func quickReactionSetupController(
|
|||||||
isStandalone: false,
|
isStandalone: false,
|
||||||
isStatusSelection: false,
|
isStatusSelection: false,
|
||||||
isReactionSelection: true,
|
isReactionSelection: true,
|
||||||
|
isEmojiSelection: false,
|
||||||
isQuickReactionSelection: true,
|
isQuickReactionSelection: true,
|
||||||
topReactionItems: [],
|
topReactionItems: [],
|
||||||
areUnicodeEmojiEnabled: false,
|
areUnicodeEmojiEnabled: false,
|
||||||
|
@ -1701,8 +1701,7 @@ public final class EmojiSearchHeaderView: UIView, UITextFieldDelegate {
|
|||||||
self.clearIconView.isHidden = true
|
self.clearIconView.isHidden = true
|
||||||
self.clearIconTintView.isHidden = true
|
self.clearIconTintView.isHidden = true
|
||||||
self.clearIconButton.isHidden = true
|
self.clearIconButton.isHidden = true
|
||||||
|
|
||||||
|
|
||||||
self.deactivated()
|
self.deactivated()
|
||||||
|
|
||||||
if let textField = self.textField {
|
if let textField = self.textField {
|
||||||
@ -1711,6 +1710,9 @@ public final class EmojiSearchHeaderView: UIView, UITextFieldDelegate {
|
|||||||
textField.resignFirstResponder()
|
textField.resignFirstResponder()
|
||||||
textField.removeFromSuperview()
|
textField.removeFromSuperview()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.tintTextView.view?.isHidden = false
|
||||||
|
self.textView.view?.isHidden = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func clearPressed() {
|
@objc private func clearPressed() {
|
||||||
@ -1720,6 +1722,9 @@ public final class EmojiSearchHeaderView: UIView, UITextFieldDelegate {
|
|||||||
self.clearIconView.isHidden = true
|
self.clearIconView.isHidden = true
|
||||||
self.clearIconTintView.isHidden = true
|
self.clearIconTintView.isHidden = true
|
||||||
self.clearIconButton.isHidden = true
|
self.clearIconButton.isHidden = true
|
||||||
|
|
||||||
|
self.tintTextView.view?.isHidden = false
|
||||||
|
self.textView.view?.isHidden = false
|
||||||
}
|
}
|
||||||
|
|
||||||
public func textFieldDidBeginEditing(_ textField: UITextField) {
|
public func textFieldDidBeginEditing(_ textField: UITextField) {
|
||||||
@ -6260,6 +6265,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
isStandalone: Bool,
|
isStandalone: Bool,
|
||||||
isStatusSelection: Bool,
|
isStatusSelection: Bool,
|
||||||
isReactionSelection: Bool,
|
isReactionSelection: Bool,
|
||||||
|
isEmojiSelection: Bool,
|
||||||
isTopicIconSelection: Bool = false,
|
isTopicIconSelection: Bool = false,
|
||||||
isQuickReactionSelection: Bool = false,
|
isQuickReactionSelection: Bool = false,
|
||||||
topReactionItems: [EmojiComponentReactionItem],
|
topReactionItems: [EmojiComponentReactionItem],
|
||||||
@ -6977,8 +6983,8 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
displaySearchWithPlaceholder = strings.EmojiSearch_SearchStatusesPlaceholder
|
displaySearchWithPlaceholder = strings.EmojiSearch_SearchStatusesPlaceholder
|
||||||
} else if isTopicIconSelection {
|
} else if isTopicIconSelection {
|
||||||
displaySearchWithPlaceholder = strings.EmojiSearch_SearchTopicIconsPlaceholder
|
displaySearchWithPlaceholder = strings.EmojiSearch_SearchTopicIconsPlaceholder
|
||||||
} else {
|
} else if isEmojiSelection {
|
||||||
displaySearchWithPlaceholder = "Search Emoji"
|
displaySearchWithPlaceholder = strings.EmojiSearch_SearchEmojiPlaceholder
|
||||||
searchInitiallyHidden = false
|
searchInitiallyHidden = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -883,15 +883,22 @@ public final class GifPagerContentComponent: Component {
|
|||||||
guard let theme = self.theme else {
|
guard let theme = self.theme else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if self.vibrancyEffectView == nil {
|
if theme.overallDarkAppearance {
|
||||||
let style: UIBlurEffect.Style
|
if let vibrancyEffectView = self.vibrancyEffectView {
|
||||||
style = .extraLight
|
self.vibrancyEffectView = nil
|
||||||
let blurEffect = UIBlurEffect(style: style)
|
vibrancyEffectView.removeFromSuperview()
|
||||||
let vibrancyEffect = UIVibrancyEffect(blurEffect: blurEffect)
|
}
|
||||||
let vibrancyEffectView = UIVisualEffectView(effect: vibrancyEffect)
|
} else {
|
||||||
self.vibrancyEffectView = vibrancyEffectView
|
if self.vibrancyEffectView == nil {
|
||||||
self.backgroundView.addSubview(vibrancyEffectView)
|
let style: UIBlurEffect.Style
|
||||||
vibrancyEffectView.contentView.addSubview(self.mirrorContentScrollView)
|
style = .extraLight
|
||||||
|
let blurEffect = UIBlurEffect(style: style)
|
||||||
|
let vibrancyEffect = UIVibrancyEffect(blurEffect: blurEffect)
|
||||||
|
let vibrancyEffectView = UIVisualEffectView(effect: vibrancyEffect)
|
||||||
|
self.vibrancyEffectView = vibrancyEffectView
|
||||||
|
self.backgroundView.addSubview(vibrancyEffectView)
|
||||||
|
vibrancyEffectView.contentView.addSubview(self.mirrorContentScrollView)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.backgroundView.updateColor(color: theme.chat.inputMediaPanel.backgroundColor, enableBlur: true, forceKeepBlur: false, transition: transition.containedViewLayoutTransition)
|
self.backgroundView.updateColor(color: theme.chat.inputMediaPanel.backgroundColor, enableBlur: true, forceKeepBlur: false, transition: transition.containedViewLayoutTransition)
|
||||||
transition.setFrame(view: self.backgroundView, frame: backgroundFrame)
|
transition.setFrame(view: self.backgroundView, frame: backgroundFrame)
|
||||||
|
@ -547,6 +547,7 @@ private final class ForumCreateTopicScreenComponent: CombinedComponent {
|
|||||||
isStandalone: false,
|
isStandalone: false,
|
||||||
isStatusSelection: false,
|
isStatusSelection: false,
|
||||||
isReactionSelection: false,
|
isReactionSelection: false,
|
||||||
|
isEmojiSelection: false,
|
||||||
isTopicIconSelection: true,
|
isTopicIconSelection: true,
|
||||||
topReactionItems: [],
|
topReactionItems: [],
|
||||||
areUnicodeEmojiEnabled: false,
|
areUnicodeEmojiEnabled: false,
|
||||||
@ -614,6 +615,7 @@ private final class ForumCreateTopicScreenComponent: CombinedComponent {
|
|||||||
isStandalone: false,
|
isStandalone: false,
|
||||||
isStatusSelection: false,
|
isStatusSelection: false,
|
||||||
isReactionSelection: false,
|
isReactionSelection: false,
|
||||||
|
isEmojiSelection: false,
|
||||||
isTopicIconSelection: true,
|
isTopicIconSelection: true,
|
||||||
topReactionItems: [],
|
topReactionItems: [],
|
||||||
areUnicodeEmojiEnabled: false,
|
areUnicodeEmojiEnabled: false,
|
||||||
|
@ -1134,6 +1134,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
isStandalone: false,
|
isStandalone: false,
|
||||||
isStatusSelection: false,
|
isStatusSelection: false,
|
||||||
isReactionSelection: true,
|
isReactionSelection: true,
|
||||||
|
isEmojiSelection: false,
|
||||||
topReactionItems: reactionItems,
|
topReactionItems: reactionItems,
|
||||||
areUnicodeEmojiEnabled: false,
|
areUnicodeEmojiEnabled: false,
|
||||||
areCustomEmojiEnabled: true,
|
areCustomEmojiEnabled: true,
|
||||||
|
@ -90,7 +90,7 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
|
|||||||
let animationCache = context.animationCache
|
let animationCache = context.animationCache
|
||||||
let animationRenderer = context.animationRenderer
|
let animationRenderer = context.animationRenderer
|
||||||
|
|
||||||
let emojiItems = EmojiPagerContentComponent.emojiInputData(context: context, animationCache: animationCache, animationRenderer: animationRenderer, isStandalone: false, isStatusSelection: false, isReactionSelection: false, topReactionItems: [], areUnicodeEmojiEnabled: true, areCustomEmojiEnabled: areCustomEmojiEnabled, chatPeerId: chatPeerId)
|
let emojiItems = EmojiPagerContentComponent.emojiInputData(context: context, animationCache: animationCache, animationRenderer: animationRenderer, isStandalone: false, isStatusSelection: false, isReactionSelection: false, isEmojiSelection: true, topReactionItems: [], areUnicodeEmojiEnabled: true, areCustomEmojiEnabled: areCustomEmojiEnabled, chatPeerId: chatPeerId)
|
||||||
|
|
||||||
let stickerNamespaces: [ItemCollectionId.Namespace] = [Namespaces.ItemCollection.CloudStickerPacks]
|
let stickerNamespaces: [ItemCollectionId.Namespace] = [Namespaces.ItemCollection.CloudStickerPacks]
|
||||||
let stickerOrderedItemListCollectionIds: [Int32] = [Namespaces.OrderedItemList.CloudSavedStickers, Namespaces.OrderedItemList.CloudRecentStickers, Namespaces.OrderedItemList.CloudAllPremiumStickers]
|
let stickerOrderedItemListCollectionIds: [Int32] = [Namespaces.OrderedItemList.CloudSavedStickers, Namespaces.OrderedItemList.CloudRecentStickers, Namespaces.OrderedItemList.CloudAllPremiumStickers]
|
||||||
@ -1210,10 +1210,17 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
|
|||||||
|> map { view, availableReactions, hasPremium -> [EmojiPagerContentComponent.ItemGroup] in
|
|> map { view, availableReactions, hasPremium -> [EmojiPagerContentComponent.ItemGroup] in
|
||||||
var result: [(String, TelegramMediaFile?, String)] = []
|
var result: [(String, TelegramMediaFile?, String)] = []
|
||||||
|
|
||||||
|
var existingEmoticons = Set<String>()
|
||||||
|
var allEmoticonsList: [String] = []
|
||||||
var allEmoticons: [String: String] = [:]
|
var allEmoticons: [String: String] = [:]
|
||||||
for keyword in keywords {
|
for keyword in keywords {
|
||||||
for emoticon in keyword.emoticons {
|
for emoticon in keyword.emoticons {
|
||||||
allEmoticons[emoticon] = keyword.keyword
|
allEmoticons[emoticon] = keyword.keyword
|
||||||
|
|
||||||
|
if !existingEmoticons.contains(emoticon) {
|
||||||
|
allEmoticonsList.append(emoticon)
|
||||||
|
existingEmoticons.insert(emoticon)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1250,7 +1257,8 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
|
|||||||
let item = EmojiPagerContentComponent.Item(
|
let item = EmojiPagerContentComponent.Item(
|
||||||
animationData: animationData,
|
animationData: animationData,
|
||||||
content: .animation(animationData),
|
content: .animation(animationData),
|
||||||
itemFile: itemFile, subgroupId: nil,
|
itemFile: itemFile,
|
||||||
|
subgroupId: nil,
|
||||||
icon: .none,
|
icon: .none,
|
||||||
accentTint: false
|
accentTint: false
|
||||||
)
|
)
|
||||||
@ -1258,6 +1266,17 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for emoji in allEmoticonsList {
|
||||||
|
items.append(EmojiPagerContentComponent.Item(
|
||||||
|
animationData: nil,
|
||||||
|
content: .staticEmoji(emoji),
|
||||||
|
itemFile: nil,
|
||||||
|
subgroupId: nil,
|
||||||
|
icon: .none,
|
||||||
|
accentTint: false)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
return [EmojiPagerContentComponent.ItemGroup(
|
return [EmojiPagerContentComponent.ItemGroup(
|
||||||
supergroupId: "search",
|
supergroupId: "search",
|
||||||
groupId: "search",
|
groupId: "search",
|
||||||
@ -2262,7 +2281,7 @@ final class EntityInputView: UIView, AttachmentTextInputPanelInputView, UIInputV
|
|||||||
|
|
||||||
let semaphore = DispatchSemaphore(value: 0)
|
let semaphore = DispatchSemaphore(value: 0)
|
||||||
var emojiComponent: EmojiPagerContentComponent?
|
var emojiComponent: EmojiPagerContentComponent?
|
||||||
let _ = EmojiPagerContentComponent.emojiInputData(context: context, animationCache: self.animationCache, animationRenderer: self.animationRenderer, isStandalone: true, isStatusSelection: false, isReactionSelection: false, topReactionItems: [], areUnicodeEmojiEnabled: true, areCustomEmojiEnabled: areCustomEmojiEnabled, chatPeerId: nil).start(next: { value in
|
let _ = EmojiPagerContentComponent.emojiInputData(context: context, animationCache: self.animationCache, animationRenderer: self.animationRenderer, isStandalone: true, isStatusSelection: false, isReactionSelection: false, isEmojiSelection: false, topReactionItems: [], areUnicodeEmojiEnabled: true, areCustomEmojiEnabled: areCustomEmojiEnabled, chatPeerId: nil).start(next: { value in
|
||||||
emojiComponent = value
|
emojiComponent = value
|
||||||
semaphore.signal()
|
semaphore.signal()
|
||||||
})
|
})
|
||||||
@ -2277,7 +2296,7 @@ final class EntityInputView: UIView, AttachmentTextInputPanelInputView, UIInputV
|
|||||||
gifs: nil,
|
gifs: nil,
|
||||||
availableGifSearchEmojies: []
|
availableGifSearchEmojies: []
|
||||||
),
|
),
|
||||||
updatedInputData: EmojiPagerContentComponent.emojiInputData(context: context, animationCache: self.animationCache, animationRenderer: self.animationRenderer, isStandalone: true, isStatusSelection: false, isReactionSelection: false, topReactionItems: [], areUnicodeEmojiEnabled: true, areCustomEmojiEnabled: areCustomEmojiEnabled, chatPeerId: nil) |> map { emojiComponent -> ChatEntityKeyboardInputNode.InputData in
|
updatedInputData: EmojiPagerContentComponent.emojiInputData(context: context, animationCache: self.animationCache, animationRenderer: self.animationRenderer, isStandalone: true, isStatusSelection: false, isReactionSelection: false, isEmojiSelection: false, topReactionItems: [], areUnicodeEmojiEnabled: true, areCustomEmojiEnabled: areCustomEmojiEnabled, chatPeerId: nil) |> map { emojiComponent -> ChatEntityKeyboardInputNode.InputData in
|
||||||
return ChatEntityKeyboardInputNode.InputData(
|
return ChatEntityKeyboardInputNode.InputData(
|
||||||
emoji: emojiComponent,
|
emoji: emojiComponent,
|
||||||
stickers: nil,
|
stickers: nil,
|
||||||
|
@ -1221,7 +1221,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !isBroadcastChannel {
|
if !isBroadcastChannel {
|
||||||
hasAvatar = item.content.firstMessage.effectivelyIncoming(item.context.account.peerId)
|
hasAvatar = incoming
|
||||||
} else if case .feed = item.chatLocation {
|
} else if case .feed = item.chatLocation {
|
||||||
hasAvatar = true
|
hasAvatar = true
|
||||||
}
|
}
|
||||||
@ -1269,7 +1269,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
|
|||||||
}
|
}
|
||||||
} else if item.message.id.peerId.isReplies {
|
} else if item.message.id.peerId.isReplies {
|
||||||
needsShareButton = false
|
needsShareButton = false
|
||||||
} else if item.message.effectivelyIncoming(item.context.account.peerId) {
|
} else if incoming {
|
||||||
if let _ = sourceReference {
|
if let _ = sourceReference {
|
||||||
needsShareButton = true
|
needsShareButton = true
|
||||||
}
|
}
|
||||||
@ -1801,7 +1801,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
|
|||||||
let dateText = stringForMessageTimestampStatus(accountPeerId: item.context.account.peerId, message: message, dateTimeFormat: item.presentationData.dateTimeFormat, nameDisplayOrder: item.presentationData.nameDisplayOrder, strings: item.presentationData.strings, format: dateFormat)
|
let dateText = stringForMessageTimestampStatus(accountPeerId: item.context.account.peerId, message: message, dateTimeFormat: item.presentationData.dateTimeFormat, nameDisplayOrder: item.presentationData.nameDisplayOrder, strings: item.presentationData.strings, format: dateFormat)
|
||||||
|
|
||||||
let statusType: ChatMessageDateAndStatusType
|
let statusType: ChatMessageDateAndStatusType
|
||||||
if message.effectivelyIncoming(item.context.account.peerId) {
|
if incoming {
|
||||||
statusType = .ImageIncoming
|
statusType = .ImageIncoming
|
||||||
} else {
|
} else {
|
||||||
if isFailed {
|
if isFailed {
|
||||||
@ -2080,7 +2080,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
|
|||||||
reactions: bubbleReactions,
|
reactions: bubbleReactions,
|
||||||
message: item.message,
|
message: item.message,
|
||||||
accountPeer: item.associatedData.accountPeer,
|
accountPeer: item.associatedData.accountPeer,
|
||||||
isIncoming: item.message.effectivelyIncoming(item.context.account.peerId),
|
isIncoming: incoming,
|
||||||
constrainedWidth: maximumNodeWidth
|
constrainedWidth: maximumNodeWidth
|
||||||
))
|
))
|
||||||
maxContentWidth = max(maxContentWidth, minWidth)
|
maxContentWidth = max(maxContentWidth, minWidth)
|
||||||
|
@ -165,7 +165,11 @@ class ChatMessageInstantVideoBubbleContentNode: ChatMessageBubbleContentNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let incoming = item.message.effectivelyIncoming(item.context.account.peerId)
|
var incoming = item.message.effectivelyIncoming(item.context.account.peerId)
|
||||||
|
if case .forwardedMessages = item.associatedData.subject {
|
||||||
|
incoming = false
|
||||||
|
}
|
||||||
|
|
||||||
let statusType: ChatMessageDateAndStatusType?
|
let statusType: ChatMessageDateAndStatusType?
|
||||||
switch preparePosition {
|
switch preparePosition {
|
||||||
case .linear(_, .None), .linear(_, .Neighbour(true, _, _)):
|
case .linear(_, .None), .linear(_, .Neighbour(true, _, _)):
|
||||||
@ -198,7 +202,7 @@ class ChatMessageInstantVideoBubbleContentNode: ChatMessageBubbleContentNode {
|
|||||||
forcedIsEdited: item.isItemEdited,
|
forcedIsEdited: item.isItemEdited,
|
||||||
file: selectedFile!,
|
file: selectedFile!,
|
||||||
automaticDownload: automaticDownload,
|
automaticDownload: automaticDownload,
|
||||||
incoming: item.message.effectivelyIncoming(item.context.account.peerId),
|
incoming: incoming,
|
||||||
isRecentActions: item.associatedData.isRecentActions,
|
isRecentActions: item.associatedData.isRecentActions,
|
||||||
forcedResourceStatus: item.associatedData.forcedResourceStatus,
|
forcedResourceStatus: item.associatedData.forcedResourceStatus,
|
||||||
dateAndStatusType: statusType,
|
dateAndStatusType: statusType,
|
||||||
|
@ -231,6 +231,11 @@ class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
|
|||||||
var updatedInfoBackgroundImage: UIImage?
|
var updatedInfoBackgroundImage: UIImage?
|
||||||
var updatedMuteIconImage: UIImage?
|
var updatedMuteIconImage: UIImage?
|
||||||
|
|
||||||
|
var incoming = item.message.effectivelyIncoming(item.context.account.peerId)
|
||||||
|
if case .forwardedMessages = item.associatedData.subject {
|
||||||
|
incoming = false
|
||||||
|
}
|
||||||
|
|
||||||
var viaBotApply: (TextNodeLayout, () -> TextNode)?
|
var viaBotApply: (TextNodeLayout, () -> TextNode)?
|
||||||
var replyInfoApply: (CGSize, (Bool) -> ChatMessageReplyInfoNode)?
|
var replyInfoApply: (CGSize, (Bool) -> ChatMessageReplyInfoNode)?
|
||||||
var updatedReplyBackgroundNode: NavigationBackgroundNode?
|
var updatedReplyBackgroundNode: NavigationBackgroundNode?
|
||||||
@ -430,7 +435,7 @@ class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
|
|||||||
let arguments = TransformImageArguments(corners: ImageCorners(radius: videoFrame.size.width / 2.0), imageSize: videoFrame.size, boundingSize: videoFrame.size, intrinsicInsets: UIEdgeInsets())
|
let arguments = TransformImageArguments(corners: ImageCorners(radius: videoFrame.size.width / 2.0), imageSize: videoFrame.size, boundingSize: videoFrame.size, intrinsicInsets: UIEdgeInsets())
|
||||||
|
|
||||||
let statusType: ChatMessageDateAndStatusType
|
let statusType: ChatMessageDateAndStatusType
|
||||||
if item.message.effectivelyIncoming(item.context.account.peerId) {
|
if incoming {
|
||||||
switch statusDisplayType {
|
switch statusDisplayType {
|
||||||
case .free:
|
case .free:
|
||||||
statusType = .FreeIncoming
|
statusType = .FreeIncoming
|
||||||
@ -622,7 +627,7 @@ class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
|
|||||||
durationBlurColor = (selectDateFillStaticColor(theme: theme.theme, wallpaper: theme.wallpaper), dateFillNeedsBlur(theme: theme.theme, wallpaper: theme.wallpaper))
|
durationBlurColor = (selectDateFillStaticColor(theme: theme.theme, wallpaper: theme.wallpaper), dateFillNeedsBlur(theme: theme.theme, wallpaper: theme.wallpaper))
|
||||||
case .bubble:
|
case .bubble:
|
||||||
durationBlurColor = nil
|
durationBlurColor = nil
|
||||||
if item.message.effectivelyIncoming(item.context.account.peerId) {
|
if incoming {
|
||||||
durationTextColor = theme.theme.chat.message.incoming.secondaryTextColor
|
durationTextColor = theme.theme.chat.message.incoming.secondaryTextColor
|
||||||
} else {
|
} else {
|
||||||
durationTextColor = theme.theme.chat.message.outgoing.secondaryTextColor
|
durationTextColor = theme.theme.chat.message.outgoing.secondaryTextColor
|
||||||
@ -733,9 +738,7 @@ class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
let incoming = item.message.effectivelyIncoming(item.context.account.peerId)
|
|
||||||
|
|
||||||
var displayTranscribe: Bool
|
var displayTranscribe: Bool
|
||||||
if item.message.id.peerId.namespace != Namespaces.Peer.SecretChat && statusDisplayType == .free {
|
if item.message.id.peerId.namespace != Namespaces.Peer.SecretChat && statusDisplayType == .free {
|
||||||
if item.associatedData.isPremium {
|
if item.associatedData.isPremium {
|
||||||
|
@ -3362,6 +3362,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
isStandalone: false,
|
isStandalone: false,
|
||||||
isStatusSelection: true,
|
isStatusSelection: true,
|
||||||
isReactionSelection: false,
|
isReactionSelection: false,
|
||||||
|
isEmojiSelection: false,
|
||||||
topReactionItems: [],
|
topReactionItems: [],
|
||||||
areUnicodeEmojiEnabled: false,
|
areUnicodeEmojiEnabled: false,
|
||||||
areCustomEmojiEnabled: true,
|
areCustomEmojiEnabled: true,
|
||||||
@ -5522,6 +5523,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
phoneCallAction()
|
phoneCallAction()
|
||||||
}
|
}
|
||||||
})))
|
})))
|
||||||
|
} else {
|
||||||
isAnonymousNumber = true
|
isAnonymousNumber = true
|
||||||
}
|
}
|
||||||
items.append(.action(ContextMenuActionItem(text: presentationData.strings.Conversation_ContextMenuCopy, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Copy"), color: theme.contextMenu.primaryColor) }, action: { c, _ in
|
items.append(.action(ContextMenuActionItem(text: presentationData.strings.Conversation_ContextMenuCopy, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Copy"), color: theme.contextMenu.primaryColor) }, action: { c, _ in
|
||||||
@ -5538,6 +5540,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
isAnonymousNumber = true
|
isAnonymousNumber = true
|
||||||
}
|
}
|
||||||
items.append(
|
items.append(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user